PowerCLI-Example-Scripts
PowerCLI-Example-Scripts copied to clipboard
get-hvmachinesummary : How to export Machine Name , User & the Status to a CSV File
trafficstars
By using get-hvmachinesummary , How can I export only the Machine Name , User & the Status to a CSV File ?
Something like this:
Get-HVMachineSummary -HvServer $hvs -PoolName $pool | select -ExpandProperty Base | select Name, User, BasicState | Export-Csv -Path c:\path\my.csv
This actually does not work. The User output is "VMware.Hv.UserOrGroupId" for all VDIs as seen below:
Name User BasicState
---- ---- ----------
VDI01 VMware.Hv.UserOrGroupId DISCONNECTED
VDI02 VMware.Hv.UserOrGroupId DISCONNECTED
VDI03 VMware.Hv.UserOrGroupId AVAILABLE
Is there any way to get this User Info when using "Get-HVMachineSummar"
Bump. Would like to know how to get user info with this command or Get-HVMachine