PowerCLI: Retrieve VMs where CPU or Memory Reservation has been enabled

The below script block will retrieve VMs where either or both CPU and Memory reservation has been configured and return the value by using the Get-VM cmdlet and retriving the value of both the ‘ExtensionData.ResourceConfig.CpuAllocation.Reservation’ and ‘ExtensionData.ResourceConfig.MemoryAllocation.Reservation’ properties.   $VMs = Get-VM | Where-Object {$_.ExtensionData.ResourceConfig.MemoryAllocation.Reservation -ne “0” -or $_.ExtensionData.ResourceConfig.CpuAllocation.Reservation -ne “0”} ForEach ($VM in $VMs) … More PowerCLI: Retrieve VMs where CPU or Memory Reservation has been enabled

Retrieve collection of Microsoft Windows Server 2003 VMs using PowerCLI

As the extended support end date looms nearer for Windows Server 2003 R2  or to be more precise 14/07/2015 (http://support.microsoft.com/lifecycle/search/default.aspx?alpha=Windows+Server+2003+R2) a number of you may still be running editions of this operating system. An easy way to discover this using PowerCLI is to use the Get-VM cmdlet and filter the results where the ‘Guest.OSFullName’ property is … More Retrieve collection of Microsoft Windows Server 2003 VMs using PowerCLI