Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Following 3 variable request IP address and port of target server.
- $targetPortalIP = read-host -Prompt "Please enter the IP address of the iSCSI storage"
- $chapUser = read-host -Prompt "Please enter the CHAP username"
- $chapSecret = read-host -Prompt "Please enter the CHAP secret"
- #Just to make life easier; these list the available IQNs and prompts you to choose an
- #IQN to connect to.
- Write-Host "Here's a list of the iSCSI targets"
- Write-Host ""
- Get-iscsiTarget | fl
- Write-Host ""
- $targetIQN = read-host -Prompt "Please paste the IQN you want here"
- Write-Host ""
- #Connects to the IQN using all the details above.
- connect-iscsitarget -NodeAddress $targetIQN -TargetPortalAddress $targetPortalIP -TargetPortalPortNumber 3260 -IsPersistent $true -AuthenticationType ONEWAYCHAP -IsMultiPathEnabled $true -ChapUsername $chapUser -ChapSecret $chapSecret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement