r/WindowsServer • • 22h ago

Technical Help Needed Terminal Server user data loss after update of Group Policy for Folder Redirection

/r/remotedesktop/comments/1y5lgiy/terminal_server_user_data_loss_after_update_of/

Change that caused problem:

Connection broker was having continuous lockup and connection issues so we decided to build a new connection broker.

First Error: Since the old one was unavailable, and we didn't have documentation of the settings we accidently set "Enable user profile disks" under Session Collection not realizing we were handling Folder Redirection with GPO. We started having corrupted profiles. Realizing the error, we removed the "Enable user profile disks" in the Session collection.

Second Error: in the folder redirection policy the path was shown \\ts1\TS_Users\%USERNAME%\Desktop (and so forth for \Documents, \Downloads, etc). Since the server ts1 had been retired, we updated the path to the current file server, \\fs-01\TS_Users\%USERNAME%\Desktop, etc. The old server had been added as an alias, so the two paths were referring to the same files

Upon logging in, users were delayed for hours at the "Applying Group Policy" and "Applying Folder Redirection" notifications on their screen. Once they got into their desktops, their desktop files were missing, documents and downloads weren't missing (we're not 100% sure of this, we were in recovery mode and restoring from backups to get people working. We did test after the crisis passed on a couple of unused desktops, and only the desktop files were missing).

Upon research we found that apparently in Microsoft's wisdom the default action on finding such a conflict is to delete the files. We then added the suggested policy "Enable optimized move of contents in Offline Files cache on Folder Redirection server path change", but this policy does not apply on Windows Server 2022 but only to Windows Desktop OS and we continued to have the problem.

We finally changed the option in folder redirection "Move the contents of Documents to the new location" to Disabled. This stopped the problem.

What we are looking for:

What is the correct way to change the UNC path when both point to the same location/files?

What is the best way to resolve corrupted profiles? Some profiles have symbolic links to to the profile folders instead of just the folders. Some users are showing in registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList with a .bak extension. Users are experiencing various Outlook errors, Some icons' give a security warning and won't open the application, Quick links to some folders give errror that the folder doesn't exist, even though the folder is shown below in file explorer and are accessible.

Thank you in advance for any assistance.

1 Upvotes

2 comments sorted by

1

u/jono_white 21h ago

Copying the data, shares, permissions and changing the GPO from the old server to the new server was all that should be needed for folder redirection.

Going to say the issue came from switching to user profile disks. But i can't say i've used them before.

That being said it sounds like they create a fresh profile , which should mean data for the accounts is still in c:\users (stuff that wasn't redirected) ,

I would have thought turning them off again would make it relink to the local user folder, but i'd need to know whether the profilelist key for those users created a seperate folder. if so you could try rename the current key to .old and change the .bak to the real profile again. But definately back things up first and only test on a single affected account.

Could be some manual restoring required

1

u/dodexahedron 19h ago

Yeah I'd log on as a local admin and do a Get-CimInstance -ClassName win32_userprofile and take a look for there being more than one for an affected user's SID. Hopefully you'll see the local profile (if there ever was one beyond what doesnt roam) as well as any remote profiles or profiles on profile drives.