Update vm-shutdown.ps1

This commit is contained in:
2024-01-31 14:50:58 -06:00
parent bf6a5cf348
commit 2d8ca41d3f

View File

@@ -1,7 +1,8 @@
#!/usr/bin/env pwsh
. /opt/idssys/powerwall/settings.ps1
Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
#Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
Connect-VIServer $VCENTERHOST -Force -Protocol https -User $VCENTERUSER -Password $VCENTERPASS
$vmhosts=$args[0].Split(",")
Foreach ($vmhost in $vmhosts)