I have a set of tags that I would like to deploy to folders in vCenter, and would like to know if there is a method to automatically assign those tags to the VMs that reside in the folder that was tagged. Thank you in advance!
You can do something like this very easily:
$VMs = Get-Folder -Name "Ansible Lab" | Get-VM
foreach ($this in $VMs){
New-TagAssignment -Entity $this -Tag Finance}
Programmatically, yes. Graphically, no.
Do you have any guidance for this process?
Using PowerCLI it's a simple process. Are you open to using that?
Yes. We have a number of different folders, so it depends on how intricate it is. We already have some tags being synced between two different vCenters with PowerCLI.
You can do something like this very easily:
$VMs = Get-Folder -Name "Ansible Lab" | Get-VM
foreach ($this in $VMs){
New-TagAssignment -Entity $this -Tag Finance}
Thanks, I can work with this!