VMware Cloud Community
calladd
Enthusiast
Enthusiast

Find the Desktops a user is assigned to in VMware View via PowerCLI

Basically I am looking to do what the Subject says,  My only addition is the user running the script may not know what Pool the desktop is currently in.  I am looking to automate the replacement of Zero-Clients in my environment that use Kiosk mode.  Essentially I have a CM-<Mac Address> AD account that gets assigned a Desktop and when a Zero-Client is replaced the tech need to also change the assigned user in VMware View to match the new CM-<Mac Address> account.  The caviat here is that tech may not have the luxury of knowing what pool the desktop is in.

Now my first thought was to build the script so that it first queried and stored all the names of the pools into an array, then using for-each loop it would attempt to find the user account in the current pool for that step of the for-each loop, if it found the user it would then un-assign the old user and assign the new user.

I post this to see if someone may have an more eligant solution.

0 Kudos
0 Replies