Validate identifiers are present
This commit is contained in:
@@ -16,8 +16,12 @@ function Suspend-ZertoVpg {
|
||||
process {
|
||||
foreach ($name in $vpgName) {
|
||||
$id = $(Get-ZertoVpg -name $name).vpgIdentifier
|
||||
$uri = "{0}/{1}/pause" -f $baseUri, $id
|
||||
Invoke-ZertoRestRequest -uri $uri -method "POST"
|
||||
if ( -not $id ) {
|
||||
Write-Error "VPG: $name not found. Skipping."
|
||||
} else {
|
||||
$uri = "{0}/{1}/pause" -f $baseUri, $id
|
||||
Invoke-ZertoRestRequest -uri $uri -method "POST"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user