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 {
|
||||
$poff = yes
|
||||
$poff = 'yes'
|
||||
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
|
||||
Foreach ($VM in $VMLIST) {
|
||||
if ((Get-VM $VM).PowerState -eq 'PoweredOn') {
|
||||
$poff = no
|
||||
if ((Get-VM $VM).PowerState -match 'PoweredOn') {
|
||||
$poff = 'no'
|
||||
}
|
||||
}
|
||||
} Until ($poff -eq yes)
|
||||
} Until ($poff -match 'yes')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user