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

Re: Need a power-shell script to ..

$
0
0

Try something like this.

 

Get-Datacenter-NameMyDC|Get-VM|Get-HardDisk|
Select@{N="VM";E={$_.Parent.Name}},Name,CapacityGB,
@{N="Type";E={[string]::Join('/',($_.DiskType,$_.StorageFormat,$_.Persistence))}},
@{N="Comment";E={''*25}} |
Export-CsvC:\HD-report.csv-NoTypeInformation-UseCulture

I included a 25 character Comment field.


Viewing all articles
Browse latest Browse all 230302

Trending Articles



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