diff --git a/esxi-scripts/iscsi-vm-shutdown-verify.ps1 b/esxi-scripts/iscsi-vm-shutdown-verify.ps1 index 2de4c8d8..e52bd613 100755 --- a/esxi-scripts/iscsi-vm-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown-verify.ps1 @@ -4,7 +4,7 @@ Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null -Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | if ($_.PowerState -eq "PoweredOn") { +Get-Datastore | Where {$_.Name -like '*iSCSI-PRI*' -or $_.Name -like '*iSCSI2*'} | Get-VM | if ($_.PowerState -eq "PoweredOn") { Try{ $vm = Get-VM -Name $vmName -ErrorAction Stop switch($vm.PowerState){ diff --git a/esxi-scripts/iscsi-vm-shutdown.ps1 b/esxi-scripts/iscsi-vm-shutdown.ps1 index c3564a7a..991aa04b 100755 --- a/esxi-scripts/iscsi-vm-shutdown.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown.ps1 @@ -4,4 +4,4 @@ Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null -Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false +Get-Datastore | Where {$_.Name -like '*iSCSI-PRI*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false