VM Memory Limit

Hey, be careful dealing with VM Memory thresholds and prevent Memory Limitation when reserving memory.

This might help :


Get-vm | Get-VMResourceConfiguration | ? {$_.MemLimitGB -gt 0 -and $_.MemTReservationMB -gt 0} | select Vm, MemReservationGB, MemLimitGB | Format-Table -Autosize

And if connected to multiple vCenters:

Get-Vm | Get-VMResourceConfiguration | ? {$_.MemLimitGB -gt 0} | select Vm, MemReservationGB, MemLimitGB, @{n="vCenter"; e={$_.Uid.Substring($_.Uid.IndexOf("@")+1,$_.Uid.IndexOf(":")-$_.Uid.IndexOf("@")-1)}} | Sort-Object MemReservationGB | format-table -autosize

Advertisements

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 )

Google+ photo

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

Connecting to %s