Update iscsi-sys-vm-shutdown-verify.ps1
This commit is contained in:
@@ -15,14 +15,14 @@ $ESXI = Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -P
|
|||||||
# }
|
# }
|
||||||
|
|
||||||
Do {
|
Do {
|
||||||
$poff = yes
|
$poff = 'yes'
|
||||||
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
|
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
|
||||||
Foreach ($VM in $VMLIST) {
|
Foreach ($VM in $VMLIST) {
|
||||||
if ((Get-VM $VM).PowerState -eq 'PoweredOn') {
|
if ((Get-VM $VM).PowerState -match 'PoweredOn') {
|
||||||
$poff = no
|
$poff = 'no'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} Until ($poff -eq yes)
|
} Until ($poff -match 'yes')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user