Hi,
I need to select Virtual Machine's custom attributes from PowerCLI but i couldn't found correct commands. How can i get following "CI" attribute from PowerCLI?
Regards,
Mustafa
For a VM with the name Test-1, you can get the custom fields using the below command -
Get-VM -Name Test-1 | ft CustomFields
Or run <Get-VM -Name Test-1 | fl *> to get the complete details of the VM.
Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.
Cheers,
Supreet
I need to all of virtual machines custom attributes (for example all "CI") list.
You can use the below command to get the custom fields for all the VMs in the vCenter -
Get-VM | ft Name, CustomFields
Export to .csv file - Get-VM | ft Name, CustomFields | Export-CSV VMs-CustomFields.csv -NoTypeInformation
Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.
Cheers,
Supreet
You can see query results on the following screenshot. I don't understand report results? I need to custom field "CI" (You can see my first screenshot ) under the annotations.
Can you just run <Get-VM | ft Name, CustomFields> and share the output for a few VMs?
Cheers,
Supreet
I can get all of CI value list with following command.
get-vm | get-annotation -customattribute "CI" | select annotatedentity, name, value,uid, ExtensionData, Client | Export-Csv C:\test.csv -Force -NoTypeInformation
Ho we cam get values for particular filed like i want only value of Department and use case filed. The command is showing all the values of custom attributes