VMware Cloud Community
marius1
Enthusiast
Enthusiast

Getting a list of information I can get about a VM

I apologize for the very basic question.

In am a PoerCLI novice.

I an playing with the get-vm command and I can see the name of the VM and lots of information.

Where or how can I get a list of the properties I can see for each VM?

Regards

marius

4 Replies
schepp
Leadership
Leadership

Hey, for the beginning you can do a

     get-vm vmname | Format-List

to get a more detailed output.

Regards

Tim

LucD
Leadership
Leadership

To see the properties of any object you can use the Get-Member cmdlet.

Like this

Get-VM | Get-Member

This "pipes" the object(s) returned by Get-VM to next cmdlet, Get-Member in this case.

It will show all available properties and methods on the object(s) that it receives from the pipeline.


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

MariusRoma
Expert
Expert

Thank you again for the information.

Let me ask another question:

I see I can get the name of the folder containing the VM.

Is there any way to get the full path of the VM if the folder is inside another folder, or, at leart, to get the topl level folder instead of the inner one?

Regards

marius


Reply
0 Kudos
LucD
Leadership
Leadership

You could use my function from Get the folderpath

Or the YellowFolderName New-VIProperty.


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

Reply
0 Kudos