Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Get Expanded Property and properties level below

$
0
0

Hello guys. I want to return the sub-property of property along with main properties of my object. Ex:

Get-SCVirtualMachine -VMMServer scvmm -Name testvm2 | select Name,Location

Beside this properties i want to return sub-property  of VirtualDVDDrive property of VM. If i write like this:

Get-SCVirtualMachine -VMMServer scvmm -Name testvm2 | select Name,Location,VirtualDVDDrive.ISO

or

Get-SCVirtualMachine -VMMServer scvmm -Name testvm2 | select Name,Location,@{N='ISO';e={$_| select -ExpandProperty VirtualDVDDrive | select ISO}}

I get an error. How to return this subproperty?


Viewing all articles
Browse latest Browse all 15028

Trending Articles