Hi,
Set-VMHost -VMHost $vmhost -State "Maintenance"
Above command doesnt move powered off vms , although its default behaviour in vSphere UI while placing Maintenance Mode (ticked checked box using UI). Is there any parameter that we can set in set-vmhost command to achieve this?
regards,
Max
While the EnterMaintenanceMode method will work, did you already try using the Evacuate switch on the Set-VMHost cmdlet?
Set-VMHost $vmhost -State Maintenance -Evacuate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
While the EnterMaintenanceMode method will work, did you already try using the Evacuate switch on the Set-VMHost cmdlet?
Set-VMHost $vmhost -State Maintenance -Evacuate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD. I missed that switch.
I can confirm -Evacuate works.