Looking for some assistance with a script that will run against all vm's and show where the unlimited option is checked/not checked for memory resource allocation. Any help is appreciated.
Thanks,
You can get a list of virtual machines and the memory resource allocation setting with:
Get-VM | ` Get-VMResourceConfiguration | ` Select-Object @{N="Name";E={(Get-View $_.vmid).name}},MemLimitMB
If the MemLimitMB value is -1 it means unlimited.
Regards, Robert
You can get a list of virtual machines and the memory resource allocation setting with:
Get-VM | ` Get-VMResourceConfiguration | ` Select-Object @{N="Name";E={(Get-View $_.vmid).name}},MemLimitMB
If the MemLimitMB value is -1 it means unlimited.
Regards, Robert
That information can be retrieved with the Get-VMResourceConfiguration cmdlet.
Something like this
get-vm | Get-VMResourceConfiguration | `
select VM,@{N="MemLimit(MB)";E={if($_.MemLimitMB -eq -1){"Unlimited"}else{$_.MemLimitMB}}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference