Quantcast
Channel: Virtual Machine Manager – General forum
Viewing all articles
Browse latest Browse all 2770

Get Expanded Property and properties level below of VM

$
0
0

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?


Viewing all articles
Browse latest Browse all 2770

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>