Dangerous Things
Custom gadgetry for the discerning hacker

The Store is now open! Check out the gadgetry »
Like what you're reading?
Share It.

Roaming profiles and folder redirection for multiple domain forests

I started dealing with multi-domained Windows forests and many of the scripts and group policy settings currently being used only work with a single domain set up, or would work better if the domain name was taken into consideration. For example, folder redirection for two users named James Smith, but who work in totally different domains under the same forest. Both have the user name jsmith, which is unique within their own domains… but problems arise with “typical” folder redirection.

Target Folder Location
Each folder needs a target location. Windows Vista provides four options when selecting a target folder location:

• Create a folder for each user under the redirection path: This option will redirect the selected folder to the location specified in the Root Path. Also, this option will add a folder named after the user logon name. For example, if you redirect the Documents folder to the root path of \\server\share, Folder Redirection will create the Documents folder under the path \\server\share\username.

• Redirect to the following location: This option redirects the named folder to the exact path listed in the Root Path. This has the capacity to redirect multiple users using the same share path for the redirected folder. You could use this option so multiple users have the same Desktop or Start Menu.

Folder redirection only supports %USERNAME%, %USERPROFILE%, %HOMESHARE%, and %HOMEPATH% environment variables.

• Redirect to the local user profile location: This option redirects the named folder to the local user profile. The local user profile for Windows Vista is Users\Username. The local user profile for Windows XP and Windows 2000 is Documents and Settings\username.

• Redirect to the user’s home directory: This option is available only on the Documents folder and redirects the Documents folder to the home folder path configured in the properties of the user object. To make the Pictures, Music, and Videos folders follow the Documents folder to the home directory, check the “Apply redirection policy to Windows 2000, Windows 2000 Server, Windows XP, and Windows Server 2003 operating systems” setting.

I was hoping to use the Redirect to the following location setting and use environment variables like %USERNAME% and %USERDOMAIN% to separate out redirected folders to UNC paths like \\fileserver\home\%USERDOMAIN%\%USERNAME% however the lack of support for the %USERDOMAIN% environment variable in the folder redirection mechanism forces me to hard set the domain name in the path and create unique group policies for each domain.

All in all it’s not a big deal, but I spent at least 45 minutes searching for an answer to why folder redirection wasn’t working when I used %USERDOMAIN% in the redirection path. Finally I found Microsoft’s Roaming User Data Deployment guide.

If you have problems deploying folder redirection, a great technet article is available for your review. One of the juicy tidbits from that article is how to turn on detailed logging;

Folder Redirection Logging

Errors and failures of Folder Redirection processing are logged as events in the Application Event log. In addition, Folder Redirection can provide a detailed log to aid troubleshooting. To create a detailed log file for Folder Redirection, add a value to the following registry key:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Diagnostics

Set: FdeployDebugLevel = Reg_DWORD 0x0f

A log file, Fdeploy.log, is created and stored in the %windir%\debug\usermode\ folder.


One Response to “Roaming profiles and folder redirection for multiple domain forests”

  1. […] I hope this tip can help you get Folder Redirection working for you if your environment is a bit unusual. Let me know what you find! Footnotesactually Favorites, but I’m not American ↩they can be moved on a standalone machine to, but that’s a different post ↩and come on, who doesn’t do this ↩thanks to this helpful gent ↩ […]

Leave a Reply

Get Adobe Flash player