Powercli find all the vms which are having more than one disks

Using below two power cli lines we can easily find out virtual machines on the vcenter, which are having more than one hard disks.we can use same command with different parameter for find the virtual machines with other multiple hardware devices(ex two nics)

Connect-VIServer vc2.mobilab.local
get-vm | Where-Object {$_.harddisks -like “*2*”}

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: