ESXi: Determining maintanance mode status from the command line

 

If you need to know if a host is in maintenance mode via the command line, SSH into your server and run the following:

 

vim-cmd hostsvc/hostsummary | grep -i maintenance

 

This will return the following line (in this example the host is NOT in maintenance mode):

 

 inMaintenanceMode = false,

To see the entire host summary printout without filtering everything apart from maintenance, run:

 

vim-cmd hostsvc/hostsummary

 

…but you’ll soon see why grep is useful here!