Contents

All VDIs in Citrix site are unassigned randomly and automatically

Website Visitors:
Contents

Issue:

In one of the citrix sites that we had, all the user assignments to their existing static VDIs were removed automatically. This issue occurred every two weeks. None of the VDIs are deleted but when users login, they would get a new machine.

Solution:

In xendesktop logging tab, when I search with word “remove user” it shows me a lot of entries but only one user id is doing it. We have one server machine dedicated to run scripts. When we checked that server, we saw a scheduled task running a powershell script. It grabs user list from xendesktop site, checks all users in AD if they are active or not. If they are not active, it would use “remove-brokeruser” command and removes users from their machines.

This would be useful because if a user is disabled, we cant use his machine for anyone else. But with this script, disabled user’s assignment to his VDI is broken and that machine is ready to be used by some other user.

Now issue is, one of the AD server name is hard coded in the script and our AD servers were migrated a month ago. This script is still using the same old server name, when it checks if users are active or not, it doesnt get any reply and it thinks all users are disabled and removes all users from whole site.

Changed the script and issue resolved.

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: