1

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...

1

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.

1
  • 2
    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. – Evan Anderson Apr 11 '14 at 13:06
-2

Why aren't you using a GPO for that?

Computer Configuration\Administrative Templates\System\User Profiles\Set user home folder

This GP only applies to Windows 8 and 2012.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.