Update offsite-vm-shutdown.ps1
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env pwsh
|
||||
. /opt/idssys/powerwall/settings.ps1
|
||||
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
|
||||
Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null
|
||||
# Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null
|
||||
Connect-VIServer -Force -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null
|
||||
|
||||
Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'}
|
||||
Foreach ($vm in $vms)
|
||||
|
||||
Reference in New Issue
Block a user