VMware Cloud Community
bwsct
Contributor
Contributor

Question on creating Tags using PowerCLI across multiple vcenters

Is there a way to create categories and tags that span across vCenters in a linked mode configuration? I am running into some trouble implementing tags into my environment because we have many machines that we would like to use the same tags and categories for, but can only create tags and categories independently for each vCenter server.
Using PowerCli 5.5 I'd like to create 1 tag to be used on multiple VCenters.  Does anyone know if thats possible and how I could do that?
Thanks


0 Kudos
1 Reply
LucD
Leadership
Leadership

The new tag related cmdlets in PowerCLI 5.8 R1 all have the Server parameter.

That means when you for example create a new tag category, it will create that category on all the default servers (the once you see in $global:defaultviservers).

So it's a matter of

  1. Setting your PowerCLI session to multi-mode with the Set-PowerCLIConfiguration cmdlet
  2. Connecting to all the vSphere servers with Connect-VIServer

vSphere servers in linked mode should connect automatically when you connect to the 1st server.

If not, you can connect to all servers explicitely.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos