unfortunely, it doesn't work as expected.
No VM are displayed whereas, i'm sur that i've at least one with no tag.
To list all VMs that match the category "OS", i did that:
Get-TagAssignment -Category $tagCategory
and the result is that:
Uid : /VIServer=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Tag : OS/WINDOWS
Entity : PRD-webxxxxxxx
Id : com.vmware.cis.tagging.TagAssociationModel
Name : com.vmware.cis.tagging.TagAssociationModel
So, the mistake is probably in the "where-object" condition. But, i'm beginner, and don't know how to fix that.