This commit is contained in:
2023-12-30 10:46:04 -06:00
parent 857779e522
commit c708d8929d
13 changed files with 90 additions and 53 deletions

View File

@@ -1,9 +1,10 @@
#!/usr/bin/env pwsh
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null
. /opt/idssys/powerwall/settings.ps1
Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
$ESXI = Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
Get-VMHost -Name $args[0] | set-vmhost -State Maintenance
exit 0
Disconnect-VIServer $ESXI -Confirm:$false