Update iscsi-sys-vm-shutdown-verify.ps1
This commit is contained in:
@@ -17,12 +17,14 @@ Do {
|
|||||||
$poff = 'no'
|
$poff = 'no'
|
||||||
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
|
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
|
||||||
if ($VMLIST -notmatch '') {
|
if ($VMLIST -notmatch '') {
|
||||||
|
write-host "cycling thoruygh iscsi vms found"
|
||||||
Foreach ($VM in $VMLIST) {
|
Foreach ($VM in $VMLIST) {
|
||||||
if ((Get-VM $VM).PowerState -notmatch 'PoweredOn') {
|
if ((Get-VM $VM).PowerState -notmatch 'PoweredOn') {
|
||||||
$poff = 'yes'
|
$poff = 'yes'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
write-host "no iscsi vms found"
|
||||||
$poff = 'yes'
|
$poff = 'yes'
|
||||||
}
|
}
|
||||||
} Until ($poff -match 'yes')
|
} Until ($poff -match 'yes')
|
||||||
|
|||||||
Reference in New Issue
Block a user