kwhornlcs
Enthusiast
Enthusiast

Script isn't accounting for empty tags. Using the script from the original reference, change this line (on or around line 21):

$cmdbinfo | Where {$_.($Name) -eq $Tag} | Foreach {

to:

$cmdbinfo | Where {($tag) -and ($_.($Name) -eq $Tag)} | Foreach {

and see what you get.

View solution in original post