VMware Cloud Community
COS
Expert
Expert
Jump to solution

Return only the value I want

The command I run is....

get-vm -name "my-testvm" | Select DRSAutomationLevel

The return value is....

  DrsAutomationLevel

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

AsSpecifiedByCluster

How can get it to return only the value "AsSpecifiedByCluster"?

I did something like this before but I can't remember how.........lol

Thanks

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Use ExpandProperty

Get-VM -Name "my-testvm" | Select -ExpandProperty DRSAutomationLevel


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

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Use ExpandProperty

Get-VM -Name "my-testvm" | Select -ExpandProperty DRSAutomationLevel


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

0 Kudos
COS
Expert
Expert
Jump to solution

For some reason I can't mark your answer as the correct answer.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Seems to be working from my side.


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

0 Kudos