Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

The Config.GuestFullName is a property under the ExtensionData property.
It is not exposed in the .Net object of a VM, like Guest.OSFullName is.

It is a property in the vSphere VirtualMachine object.

Get-VM -Location test |

Select Name,NumCPU,MemoryMB,

   @{n="HardDiskSizeGB"; e={(Get-HardDisk -VM $_ | Measure-Object -Sum CapacityGB).Sum}},

   @{n="Date"; e={((Get-Date).ToString('yyyy-MM-dd'))}},

   @{n="IOLimit"; e={

   (Get-HardDisk -VM $_).ExtensionData.StorageIOAllocation.Limit | Measure-Object -Sum | Select -ExpandProperty Sum}},

   @{N="OS";E={$_.Guest.OSFullName}},

   @{N= 'AlternateGuestName';E={$_.ExtensionData.Config.GuestFullName}} |

Export-Csv -Path "C:\powercli\VM_Report\csv_reports\$csvfile"

The HTML code can just be copied from the editor window in Visual Studio Code.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos