Using PowerCLI to get Host Information from ESXi

PowerShell makes it very easy to get information about virtual environments in very few lines of script language. Rick Vanover shows us just how easy in a recent article that details how to get the major version and install date of all your VMware ESXi hosts using PowerCLI (VMware’s PowerShell extension).

Get-VMHostPatch * | Select ID, InstallDate, VMHostID
Get-VMHost | Select ID, name

Rick states, “…the script is simple and dirty and returns the selected information in two views. The VMHostPatch cmdlet returns only the real information I want coupled with a VMHostID. That is correlated in the Get-VMHost cmdlet, which returns the DNS name of the hosts in question. What is also cool about this is that it can report against multiple vCenter connections simultaneously (as can most cmdlets, for that matter).”

Very cool!

Continue at source…

Technorati : , ,
Del.icio.us : , ,

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top