Quantcast
Channel: Robert van den Nieuwendijk's Blog » patches
Viewing all articles
Browse latest Browse all 2

How to find VMware ESX(i) servers that need a reboot using PowerCLI

$
0
0

If you install patches to your ESX(i) servers you will probably have to reboot them. But if you don’t reboot them right after installing the patches, how can you find the servers that are patched and waiting for a reboot?

VMWare ESX(i) servers that are waiting for a reboot have the “Reboot Required” message in the Summary tab in the VMware vSphere Client. But if you have hundreds of ESX(i) servers, you don’t want to click through all your ESX(i) servers Summary tabs. You need to automate this task.

The PowerCLI one-liner from listing 1 will show you the names of all the ESX(i) servers that need a reboot.

Get-View -ViewType HostSystem -Property Name,Summary.Rebootrequired -Filter @{"Summary.RebootRequired"="True"} | Select-Object -Property Name
Listing 1. PowerCLI script to list the names of the ESX(i) servers that need a reboot

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images