Hi experts,
We have a requirement to export the get-vm and all the tags associated to the vms into a single csv file. I managed to get the inventory dump using get-vm as below and it works,. However I am not able to export the vm tags information. Even if I run it manually it shows raw data and its not aligned. Can you please help us to get these information at once in a script ?
Get-VM | Select-object Name,@{N='vCenter';E={([system.uri]$_.ExtensionData.Client.ServiceUrl).Host}}, PowerState, Notes, Guest, NumCpu, CoresPerSocket, MemoryMB, MemoryGB, VMHostId, VMHost, Folder, Version, GuestId, UsedSpaceGB, ProvisionedSpaceGB | Export-Csv -path “c:\vc_inv.csv” –NoTypeInformation
Requirement:
all vm related information
all tags associated to the vms
Thanks a lot in advance