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?