Resolve temporary profile issues on RDS / TSE remote desktops


For multiple and often unknown reasons, users are connected to their session on a temporary profile.

profil temporaire

The user does not find his settings including the Outlook profile.

All that is stored in the folder C:\Users\TEMP is not saved when they log off.

If you apply a folder redirection GPO (desktop / documents …), the files and folders modified in it will be saved instead.


The solution is to delete .BAK registry keys in the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Registre clef profil temporaire

On a farm RDS 2012R2, I had the problem regularly with 3 users and so I looked for a way to do this cleaning automatically by script using a scheduled task.

Copy the above script to a file with a vbs extension and do a scheduled task that runs every night on each RD Session Host.

The script generates a log file with the deleted registry keys.
Fichier de log

Related Posts

Failover Clustering Windows 2016/2019 – Installation and Configuration

Presentation The failover clustering feature ensures high availability of a service by using multiple servers (nodes) that can make it work. Some examples of services that can be used with the Failove

Connecting to Remote Desktop Session Host servers by the Broker

Problem If you followed the article: Setting up an RDS farm under Windows 2012R2/2016, the client connection configuration is done using a Round Robin on the DNS. What happens if the server returned b

Add an AD DS domain controller to an existing domain

In this article, I will explain how to add a domain controller to an existing domain and manage replication links. Below, an illustration of the final architecture: Throughout this tutorial, we will a