3 Replies Latest reply on Sep 25, 2020 2:15 AM by LucD

    How can i get the list of VMs with or without having tags assigned to them

    rekha_sharma Lurker

      This is the command i have been trying but not giving vms without tags

       

      Get-VM | Get-TagAssignment
         where {($_.Tag -eq $null) -or ($_.Tag -ne $null)} |
         Select @{N='VM';E={$_.Entity.Name}},`
         @{N='TagName';E={$_.Tag}},`
         @{N="Cluster";E={Get-Cluster -VM $_.Entity.Name}},`
         @{N="ESX Host";E={Get-VMHost -VM $_.Entity.Name}}