From cdff79a3b9bec0d02189fae000cc232e0d5523c0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 31 Jan 2024 10:27:00 -0600 Subject: [PATCH] Update vm-shutdown.ps1 --- esxi-scripts/vm-shutdown.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esxi-scripts/vm-shutdown.ps1 b/esxi-scripts/vm-shutdown.ps1 index e48a6b5b..cc091f0a 100755 --- a/esxi-scripts/vm-shutdown.ps1 +++ b/esxi-scripts/vm-shutdown.ps1 @@ -7,7 +7,7 @@ $where="Where {"+$args[0]+"}" write-host $where -# Get-VMHost | Where {$args[0]} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} +Get-VMHost | $where | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} # Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false