I have a question how to invoke ExitMaintenanceMode_Task.
I want to be able to get a server out of maintence mode.
You could do it like this
$esx = Get-VMHost <ESX-hostname> | Get-View $taskMoRef = $esx.ExitMaintenanceMode_Task(0) $task = Get-View $taskMoRef while ($task.Info.State -eq "running" -or $task.Info.State -eq "queued") { sleep 2 $task = Get-View $taskMoRef }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You could do it like this
$esx = Get-VMHost <ESX-hostname> | Get-View $taskMoRef = $esx.ExitMaintenanceMode_Task(0) $task = Get-View $taskMoRef while ($task.Info.State -eq "running" -or $task.Info.State -eq "queued") { sleep 2 $task = Get-View $taskMoRef }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc,
I overlooked (0)
I need a holiday