Mirian5
Contributor
Contributor

vmware - script powershell

liste os vms dentro de uma pasta e obtenha o gb alocado e a memória usada

0 Kudos
3 Replies
LucD
Leadership
Leadership

You could do 

Get-Folder -Name MyFolder | Get-VM |
Select Name,MemoryGB,
   @{N='UsedMemoryGB';E={$_.ExtensionData.Runtime.QuickStats.guestMemoryUsage/1KB}}

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Mirian5
Contributor
Contributor

Thanks for the help.

When I run the script, it brings the result of memory consumption at 0, I tested it on other vms, but it only shows at 0

 

 

0 Kudos
LucD
Leadership
Leadership

And did you cross-compare this with what you see for those VMs in the web client?
Perhaps the consumption doesn't reach 1GB?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference