Hi All, I'm using vsphere 6.7 and need to remove certain tag from multiple VM's and I don't see a way of doing this in the HTML5 client. I also tried using this powercli cmdlet Get-Tag -Category <tag> | Remove-Tag without success. Any guidance out there is appreciated.
Thanks
Hi,
have you tried this way ?
$VMs=get-content C:\Temp\test.txt
$Tag = Get-TagAssignment -Tag "New Tag"
foreach ($VM in $VMs){
$VMName = Get-VM -name $vm
Remove-TagAssignment $Tag -Confirm:$false
}
The right script is mentioned below
$VMs=get-content C:\Temp\test.txt
$Tag = Get-TagAssignment -Category "Category Name"
foreach ($VM in $VMs){
$VMName = Get-VM -name $vm
Remove-TagAssignment $Tag -Confirm:$false
}
Please try Below:
The right script is mentioned below
$VMs=get-content C:\Temp\test.txt
$Tag = Get-TagAssignment -Category "Category Name"
foreach ($VM in $VMs){
$VMName = Get-VM -name $vm
Remove-TagAssignment $Tag -Confirm:$false
}