Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

Get-Folder Datastore VM - New to powercli

$
0
0

 

The above is a datastore folder containing four datastores. I'd like to find out the VM names, power status, usageGB, and cluster of VM for all VMs using those four datastores. I'm struggling with using get-datastore, get-folder -type datastore, get-vm to get this information.

 

Get-Folder -name stc03-lab | get-datastore | get-vm gives me kind of what I want:

 

 

PowerCLI C:\> get-folder -name stc03-lab | get-datastore | get-vm -name mgt3.

 

Name                 PowerState Num CPUs MemoryGB

----                 ---------- -------- --------

mgt3. PoweredOn  2        2.000

 

What I want is:

 

VM Name                Datastore                                PowerState                 

mgt3                         st037_nl                                   PoweredOn               

 

It would be really nice to add in provisioned and used resources (memory, cpu, and storage). I am new to powercli and would appreciate any help the community can offer.


Viewing all articles
Browse latest Browse all 175326

Trending Articles