Hello guys, I've already asked this question in neighbor forum, but do not get an answer.
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}}
or
Get-SCVirtualMachine -VMMServer scvmm -Name testvm2 | Select Name,Location,@{N='VirtualDVDDrive';E={$_.VirtualDVDDrive.ISO}}I an empty string. How to return this subproperty?