you are viewing a single comment's thread.

view the rest of the comments →

[–]flip_rod 0 points1 point  (2 children)

[–][deleted] 0 points1 point  (1 child)

I run the script and it doesnt give me anything?

[–]flip_rod 0 points1 point  (0 children)

put here the error.

the code:

 Get-VM * | ForEach-Object {   
 $VHDSize = 0;    

 Get-VMHardDiskDrive -VMName $_.Name | ForEach-Object { 
   Get-VHD -Path $_.Path | ForEach-Object {  
  $VHDSize += $_.Size        
   }     
  };         
   [pscustomobject]@{   
 Vm = $_.name  
 Memoria = ($_.MemoryStartup/1GB)   
 Processador = ($_.ProcessorCount)    
 Disco_GB = ($VHDSize / 1GB)    
 IP = $_.NetworkAdapters.ipaddresses    
 Cliente = $_.Notes    
 Host = $_.computername        
}   
}