Archive

Archive for July, 2011

Get all VMs with Fixed MAC Addresses using PowerCLI

July 29, 2011 6 comments

I needed a list of all VMs with a Fixed MAC Address running on vSphere (it works for ESX 3.5 as well).

Let’s build up this command from the beginning.  We start with Get-VM to get a hold of all VMs.

Get-VM

This of course will list just any VM.  So we need some filtering.

Read more…

Advertisements
Categories: ESX, PowerCLI, vSphere

Find VMs with Mismatched OS using PowerCLI

July 27, 2011 1 comment

Almost every environment has one or more VMs where the running OS doesn’t match what is configured on the VM.

 

Let me explain:

Every VM has a property which contains the OS version:

image

This is usually set when you create the VM.  In this example, the VM is set to Windows 7 x64.  But if you install an OS in the VM, VMware is also aware of the Guest OS through VMware Tools.  This is visible on the Summary page of the VM.

image

Both fields should match, but if you upgrade the OS inside the VM and forget to change the Settings of the VM, you have a mismatch.

Read more…

Categories: PowerCLI, VMware, vSphere