VMware Cloud Community
James_McCartin
Contributor
Contributor

List all Virtual Machines with Associated Tags

I have custom attributes for application engineer, OS engineer, application name, etc. In the vSphere Client I can list all VMs and their custom attributes.  I can then sort the list by custom attribute.  Doing this allows me to find virtual machines with empty custom attributes.

I have converted my custom attributes to tags.  I cannot find a way to list all virtual machines with associated tags in the vSphere Web Client.  Is there a way to do this using PowerCLI? I'd like to be able to produce a CSV file that contains all virtual machines and their associated tags.

Tags (1)
Reply
0 Kudos
2 Replies
DZ1
Hot Shot
Hot Shot

If you have tag assignments for the category of "OS engineer".  You can write this:

Get-TagAssignment -Category "OS engineer"

That will list the tags in the category and the associated VMs.

Reply
0 Kudos
James_McCartin
Contributor
Contributor

Is there a command that will list all VMs without an "OS Engineer" tag?

Reply
0 Kudos