General discussion

Locked

Home dir script

By California Dead Head ·
I need to write a script that will remap a users home folder. For example I have users home folders on server1. In Active dir the path in their users profile is H:\server1\users\username.

Those files are replicated to server2 for disaster recovery. If server1 blows we need a script that will redirect users home folder and profile path from server1 which is where Active Directory will try and send them to server2.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by CG IT In reply to Home dir script

why not make server to a DC. AD will be replicated to it and so will DNS [allow updates]. so if server 1 does down there will be a backup DC [server 2] for clients to get DNS and AD from. The profiles will also be available on server 2 [AD replication].

Collapse -

by California Dead Head In reply to

Poster rated this answer.

Collapse -

by California Dead Head In reply to Home dir script

That will not solve the issue. The profiles will be available on server2. I have 2 DC's already. The issue is that at login AD will look to server1 for the profile info because that is what is currently in there. If server1 is down the profiles are still available on server2 but AD doesn't know that. I would have to go into each users (370) AD account and repath the home folder to server2 manually.

Collapse -

by CptOmlly In reply to Home dir script

Use a Domain DFS root to mirror the data via a single reference. This will allow you to use a "virtual" reference to files located on multiple servers. These references will also be replicated with AD replication. This will allow you to have a share \\users\profiles that may be stored on \\server1\profiles or \\server2\profiles or any other server. See this MS article for more details: http://tinyurl.com/gqox

Hope this helps

Collapse -

by California Dead Head In reply to

Poster rated this answer.

Collapse -

by Bristar In reply to Home dir script

How about something to this effect:
Dim fso, WshNetwork
Set fso = CreateObject _
("Scripting.FileSystemObject")
Set WshNetwork = WScript.CreateObject _
("WScript.Network")
If (fso.FolderExists(\\Svr1\Public)) Then
WshNetwork.MapNetworkDrive "E:", "\\Svr1\Public"
Else
WshNetwork.MapNetworkDrive "E:", "\\Svr2\Public"
End If

Collapse -

by California Dead Head In reply to

Poster rated this answer.

Collapse -

by California Dead Head In reply to Home dir script

This question was closed by the author

Back to Web Development Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums