Server 2008 R2 + Remote Desktop Services cached roaming profiles not being deleted on logoff

remote-desktop-servicesroaming-profilewindows-server-2008-r2

I've been having an issue for a few weeks now with certain roaming profiles not being deleted from my Remote Desktop Services host server when a user logs off. The issue seems to be only related to a couple of users at this point, but I'm worried about having the same issue in the future once we deploy the application company-wide.

Currently we have 15 users "testing" the remote desktop server, and I've had no issues with 13 of the users. With the other two, it appears that when they log off, any changes to their profiles propagate back to the proper network store. However, the cached copy on the server is not deleted, nor is it overwritten when the user logs back in the next time. Instead, a new user folder is created when the profile is downloaded from the server. What I end up with is potentially dozens of user profile folders for an individual user that look something like this…

username
username.domain
username.domain.001
username.domain.002
username.domain.003

There are no usability issues as far as the end-user is concerned.

Has anyone had a similar problem?

To reiterate, Remote Desktop Services is running on a Windows Server 2008 R2 VM hosted on a Citrix XenServer VM farm. All other servers related to RDS (licensing, file / profile storage, domain controller) are all running Server 2008 R2 as well.

Best Answer

Something is holding the profile open. You can use SysInternals' Process Explorer to search for the handle, specifying their profile folder path.

Additionally, it is sometimes necessary to have a scheduled task to find profiles that do not correspond to logged on users, and remove them. Removal consists of unloading the profile hive from the registry (REG UNLOAD), deleting the associated registry key for the profile located at:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<profilekey>

then deleting user profile folder.