PowerCLI One Liners

Useful commands for any number of tasks Get number of VM’s per datastore Get-Datastore | Select Name, @{N="NumVM";E={@($_ | Get-VM).Count}} | Sort Name Get ESX version and builds get-view –ViewType …

PowerCLI – Get Host Overview

Sometimes you will be asked for a quick overview of the specs on your hosts. This will give you the proc count, number of cores, CPU speed and the total …

PowerCLI – Get Hardware Serial Numbers

This can be helpful if you are in need to retrieve all serial numbers for your hosts. $vCenter = "vCenter.localdomain" Connect-VIServer $vCenter Get-VMHost | Get-View | Sort-object Name | select …