Check Backup-Tag SLA
VMware tags are a versatile tool to dynamically assign VMs to groups. One use-case is leveraging VM-Tags to guarantee backup-SLA. Im my case there’s a category named “Backup” which contains several backup SLA tags for weekly or daily backups.
Oneliner
With PowerCLI you can find out quickly which VMs have no tags.
connect-viserver myVC
get-vm | ?{ (get-tagassignment $_) -eq $null}
This query isn’t sufficient yet. It’ll report only VMs that have no tags at all. But we’d like to find VMs that have no tags from the category “Backup”. So we have to modify our query a little bit.
get-vm | ?{ (get-tagassignment $_ -category Backup) -eq $null}
You need to adjust your query with the corresponding category name.
Hello,
Do you know how I can to this automatic, I mean, how a can run a task every day to scan vms without tags.
Thank you in advance,
Hello Javier
Maybe you can run it as a scheduled task from a management workstation with PowerCLI installed. Credentials can be hidden in a credfile.