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

Re: Script to export virtual disk information in a specific format

$
0
0

Try something like this

 

$report=@()
foreach($vminGet-VM){
 
$row=New-ObjectPSObject-Property@{VMName=$vm.Name}
 
$i=1
 
Get-HardDisk-VM$vm|%{
   
$row|Add-Member-Name"HD$($i)Name"-Value$_.Name-MemberTypeNoteProperty
   
$i++
  }
 
while($i-le7){
   
$row|Add-Member-Name"HD$($i)Name"-Value$null-MemberTypeNoteProperty
   
$i++
  }
 
$report+=$row
}

I only did it for the HD name property, but the other properties can be done in a similar way.


Viewing all articles
Browse latest Browse all 236824

Trending Articles



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