Hi Team,
I would like a help to remove a tag that is named "monitoring" from 500 vms with powercli.
Does anyone have some example? should I need to put the name of all the vms inside a csv?
Placing the VM names is one option.Assuming the CSV looks like this
NameVM1VM2You could do
$tag = Get-Tag -Name 'monitoring' ConvertFrom-Csv -InputObject $csv | ForEach-Object -Process { Get-VM -Name $_.Name | Get-TagAssignment -Tag $tag | Remove-TagAssignment -Confirm:$false }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference