Repeated temporary user profiles in RDSH farm and need help clearing stale ProfileList keys

Luca Brunner 0 Reputation points
2026-09-15T13:17:02.45+00:00

Hello,

I've tried following various online guides for troubleshooting our RDSH farm (where users are repeatedly assigned temporary user profiles if I'm understanding the event logs correctly, thus their User Profile Disks fail to mount on the session hosts), using standard server reboots (less than helpful workaround, attempts to manually detach the virtual disks resulted in errors), and kicking users from the connection broker just tries to temporarily mask the issue before they get a temp profile again.

We identified that locked registry hives are the root cause preventing the UPDs from mounting, and need to clear the stale profile keys in the ProfileList. Could somebody please give me an actual working method or script to help me resolve this issue.

Windows for business | Windows 365 Enterprise
0 comments No comments

1 answer

Sort by: Most helpful
  1. Hoang Le 5,950 Reputation points Independent Advisor
    2026-09-15T14:08:24.03+00:00

    Hello Luca Brunner,

    The recurring temporary profile issue in your RDSH farm is indeed caused by stale registry hives under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList that block User Profile Disks from mounting. The supported approach is to clear those orphaned keys and force the session hosts to rebuild the profile mapping. You can use a PowerShell script that enumerates all subkeys in ProfileList, checks for ProfileImagePath values pointing to C:\Users\TEMP or to non‑existent paths, and then removes those keys. For example:

    powershell

    $profileList = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
    Get-ChildItem $profileList | ForEach-Object {
        $path = (Get-ItemProperty $_.PSPath).ProfileImagePath
        if ($path -like "*TEMP*" -or !(Test-Path $path)) {
            Remove-Item $_.PSPath -Recurse -Force
        }
    }
    

    Run this on the affected RDSH hosts, then reboot to release any locked hives. This ensures UPDs can mount cleanly on next logon. Always back up the registry before executing, and confirm no active sessions are using those profiles. If the issue persists across the farm, you may need to apply the script consistently to all hosts and validate that the User Profile Service is healthy.

    If my answer is useful for you, please hit Accept the answer to support me.

    Thank you,

    HL.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.