Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251313

Re: Get Guest partition Path & Capacity in one line

$
0
0

Here's the result

 

D:\ 14.754878997802734375 GB,C:\ 49.656246185302734375 GB

 

Based on your suggestion i was able to adapt my first idea. This one output exactly what i want

 

Get-VM "MyVM" | Select @{N='Path';E={((get-vm $_).extensiondata.Guest.Disk | sort $_.Diskpath | %{" $($_.diskPath) $([math]::Round($_.Capacity /1024MB)) GB"}) -join ','}}

 

Output :

C:\ 50GB, D:\ 15GB

 

Thx a lot

 

Raf


Viewing all articles
Browse latest Browse all 251313


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