#!/usr/bin/env pwsh . /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null Get-VMHost -Name $args[0] | set-vmhost -State Maintenance -Evacuate Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false