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 …

Setup SNMPv3 on ESX

Use the following to setup SNMPv3 on ESX v5.1 and above Set the authentication type to none, MD5 or SHA1 esxcli system snmp set –authentication MD5 Set the privacy mode …

ESX 5.1 esxcli commands

view physical nics /etc/vmware # esxcli network nic list view current connections, like using netstat /etc/vmware # esxcli network ip connection list view ip addresses and networks /etc/vmware # esxcfg-vmknic …