Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 818
  • Last Modified:

Copy Files From Domain Controller With Group Policy

Here is what we are trying to do. We have 2 domain controllers at 2 separtate locations. As part of the group policy we use folder redirection to copy some folders from \\DC1\folder. Say that DC1 is offline, when a user uses DC2 to log on, he cannot get to \\DC1\folder. Is there a way to reference the path of the domain controller you are logged into? So that the group policy folder redirection path would be \\(domain controller that authenicated me)\folder? Both servers have the same folder structure just different server names.
Thanks in advance for your awsome suggestions.
1 Solution
Have you tried using the environment variable?

I agree with pony10us, try the environment variable.  If that doesn't work for you, you can always setup and use DFS so that the data is synchronized on the two DCs.
David Johnson, CD, MVPOwnerCommented:
DFS is the way to go.. This way the data stays synced and you don't need to manually copy the files over.

DFS Setup Guide

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

I don't think the issue is the replication between DC1 and DC2. The issue as I understood it was this:

User logs on and connects using DC1 as logon server then copies files from DC1 to their folder.

Next time user logs on they connect using DC2 as logon server but the GPO points specifically at DC1 to copy the files to their folder even though the files ALSO exist on DC2 but DC1 is down for some reason so no files copied

By using the environment variable it will copy the files from whatever DCx they connect to to their folder.

Am I correct portillosjohn?
portillosjohnAuthor Commented:
That is correct pony10us.
portillosjohnAuthor Commented:
Simple and effective.

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now