GPO with loopback processing and folder redirection not working

10,794

I can't seem to find a clear, concise Microsoft reference for this, so please excuse the third-party reference.


In Windows 2000, the %HOMESHARE% environment variable is the fully qualified path to your server based profile, \\ServerName\ShareName\Folder1\Folder2\HomeFolder.

%HOMEPATH% contains a final backslash, for compatibility with previous systems. When mapped to %HOMEDRIVE%, user can access their home directory and subdirectories, but can NOT see or access the parent folder.

Example:

%HOMESHARE% - \\ServerName\ShareName\Folder1\Folder2\HomeFolder
%HOMEDRIVE% - Z:, mapped to \\ServerName\ShareName\Folder1\Folder2\HomeFolder
%HOMEPATH%   - \

The linked article also contain NT 4.0-specific information, which I certain hope is of no use to you.

As to where it's set, you can set it in the registry somewhere, but the proper place is in Active Directory, on the user object.

Using ADUC, it's the User Profile tab, under the "Home folder" section. Be sure to leave off the trailing slash, or it will break when the %HOMEPATH% appends the extra slash. See the screenshot below for how it looks on my corporate overlord's domain.

enter image description here

Of course, you don't want to be setting this variable for every user in your domain by clicking through a GUI, so you'd want to script it. Fortunately, I've done that very thing, and a sanitized version of the PowerShell "script" (a one-liner) that I used to so can be found here.

Share:
10,794

Related videos on Youtube

Matthias Güntert
Author by

Matthias Güntert

Mixing technical obsession with dedication.

Updated on September 18, 2022

Comments

  • Matthias Güntert
    Matthias Güntert over 1 year

    I am pulling my hair here and trying to redirect folders on Windows 7 and Vista machines. I have therefor created a GPO which has loopback processing enabled (merge mode) and linked it to the OU containing the machines. The folder redirection setting is configured as follows:

    Documents:

    • "Basic - Redirect everyones folder to the same location"
    • "Target folder location: Redirect to the user's home directory"

    When looking at the GPOs setting summery this results to the path: %HOMESHARE%%HOMEPATH%. However this environment variables %HOMESHARE% is not set. What sets this variable?

    My AD users have nothing set under "User profile" or "Home folder", also the "Remote Desktop Service Profile" settings are empty.

    What am I doing wrong here? Any help is greatly appreciated...

  • Spence
    Spence about 10 years
    You can bulk-set this attribute using the "Active Directory Users and Computers" management console snap-in. Use the "%USERNAME%" variable when setting it and the snap-in will automatically expand it for each user.