Get-Template -name template_OEL6.5 | Select Name, @{N="Host";E={(Get-VMhost -id $_.HostID).Name}} @{N="HD#";E={@($_.ExtensionData.Config.Hardware.Device | where{$_.GetType().Name -eq "VirtualDisk"...
See more...
Get-Template -name template_OEL6.5 | Select Name, @{N="Host";E={(Get-VMhost -id $_.HostID).Name}} @{N="HD#";E={@($_.ExtensionData.Config.Hardware.Device | where{$_.GetType().Name -eq "VirtualDisk"}).Count}}, @{N="HD Size (GB)";E={[string]::Join(',',( $_.ExtensionData.Config.Hardware.Device | where{$_.GetType().Name -eq "VirtualDisk"} | %{$_.CapacityInKB} ))}} @{N='Datastore';E={(Get-View -Id $_.DatastoreIdList -Property Name).Name -join ','}}, @{N="vCPU";E={$_.ExtensionData.Config.Hardware.NumCPU}}, @{N="RAM (GB)";E={$_.ExtensionData.Config.Hardware.MemoryGB}}, @{N="Created";E={(Get-VIEvent -Entity $_ -maxsamples ([int]::MaxValue) | where {$_.GetType().Name -eq "TaskEvent" -and $_.Info.DescriptionId -eq "VirtualMachine.markAsTemplate"} | Sort-Object -Property CreatedTime | Select -First 1).CreatedTime}........ Super simple solution, I'm sure. I would like the HD size in GB, not KB. I get stuck when I need to do [math]. Be gentle, what I don't know, I do my best to learn.