Created
August 28, 2019 18:59
-
-
Save ChrisLynchHPE/b0b617ba3a736d2f5b7c3af7c64ef4a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ports we want to modify | |
$Ports = "1:0:0", "1:0:1", "2:0:0", "2:0:1" | |
# Set the portGroup name | |
$PortGroupName = "MyPortGroup1" | |
$StorageSystem = Get-HPOVStorageSystem -Name My3ParSystem | |
ForEach ($port in $Ports) | |
{ | |
($StorageSystem.ports | ? name -eq $port).groupName = $PortGroup | |
} | |
# Now save the storage system object back to the API | |
Send-HPOVRequest -Uri $StorageSystem.uri -Method PUT -Body $StorageSystem | Wait-HPOVTaskComplete -OutVariable Results | |
if ($Results.taskState -ne 'Completed') | |
{ | |
$Results.taskErrors | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment