Posts Tagged Citrix Scripts

Script to clean up user profiles in a Citrix farm

You may have found yourself in a situation where you have had to rebuild a user’s profile to fix an issue or clean up old users’ local cached profiles from Citrix servers after they have left the organization. This wont pose a huge problem if  your Citrix farm is small. But if you have a large enough farm, going through this process of properly cleaning a user profile would be a very time consuming process.

The following steps are involved in properly cleaning up a user’s profile:

  1. Delete the registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\<SID OF THE USER> on all servers.
  2. Take ownership of the user’s local profile folder on all Citrix servers (Eg: C:\Users\JohnDoe)
  3. Delete the local user profile folder on all Citrix servers.
  4. Take ownership of the user’s redirected folder (Eg: E:\USER_FOLDERS)
  5. Backup the user’s redirected folder.
  6. Take ownership of the user’s terminal server profile (Eg: E:\USER_PROFILES)
  7. Backup the user’s terminal server profile.

I’ve hated having to do this manually and so has my team, so I wrote this script that does all the steps mentioned above. Read the rest of this entry »

,

1 Comment