Comment

Thanks for the script!  I am having a few issues though.  Were you able to get it to work as-is?

In the below line.  Should this be Get-DesktopVM or just Get-VM?  I also added a closing } to the end.  I get that to work but the entire script errors out on the ($i.user_displayname -eq  parameter. 

$vmList = Get-DesktopVM | Select Name, user_displayname | Where {$_.Name -notlike "vmName*" -and $_.Name -notlike "vmName*"  #add more exclusion is needed