Thursday, July 14, 2016

Reboot a Host with Get-View

You can reboot a host by using its corresponding view object.
Verify that you are connected to a vCenter Server system.
1
Use the Get-VMHost cmdlet to get a host by its name, and pass the result to the Get-View cmdlet to get the corresponding view object.
$vmhostView = Get-VMHost -Name Host | Get-View 
2
Call the reboot method of the host view object to reboot the host.
$vmhostView.RebootHost()

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...