Redirect mapped drives

5 pts.
Tags:
Active Directory
Login scripts
Mapped drives
Redirect
I would like to know if anyone knows of a login batch file that could be used to redirect users mapped drives. I currently have 500+ users that have various mapped drives on each of their PC's to 3 different file servers. I would like to redirect these mapped drives to a new single file server (with all network shares). Basically, the shares are being moved to a new file server.

Answer Wiki

Thanks. We'll let you know when a new response is added.

this may sound silly but

net use <drive letter :> /d — to delete the drive letter
then
net use <drive letter :> \\<server>\share

am I missing something ?

Cheers
Daryl

<a href=”http://www.myithelpdesk.com/it-support.htm”>www.myithelpdesk.com </a>

, <a href=”http://www.mailprotector.com.au”>www.mailprotector.com.au</a>

*****************
I deployed a new file server for about 100 uses, but only had 10 scripts to edit, so it was easier.
If you have a lot of scripts to edit, it could be a daunting task. You could edit scripts and add the following line to the start of each:

if exist * net use * /d /y

You could try creating a GPO that would run this in a script of it’s own for all users or specific OUs for a period of time. The VBscript to delete mappings is similar to this:

Dim wshNetwork
Set wshNetwork = CreateObject(“Wscript.Network”)
Set colDrives = wshNetwork.EnumNetworkDrives
Set ADSysInfo = CreateObject(“ADSystemInfo”)
Set CurrentUser = GetObject(“LDAP://” & ADSysInfo.UserName)
Const OUNAME = “ou=OUNAME_HERE”

For i = 0 to colDrives.Count-1 Step 2
wshNetwork.RemoveNetworkDrive colDrives.Item(i)
Next

good luck
*********************

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Yeti
    If they all share the same common mapped drives as mentions using net use with the same drives should overwrite the previous mapping when ran.
    120 pointsBadges:
    report
  • Kulkan99
    It's true you can change and force changes to drive mapping in login scripts, but you may run into other issues that could generate a lot of support calls. In particular people may have desktop shortcuts and even shortcuts in other folders that reference the old server names. What I did when combining two old servers into a new one was to combine all the existing shares/folders and use DNS aliases to that old references would still work. This involves a registry mod to windows servers as they don't normally listen to the aliases for netbios requests. It's in the "strict name checking" reg. see this link http://www.sharepointblogs.com/echef/archive/2007/08/08/allowing-netbios-responses-on-a-dns-alias-in-win-2k3.aspx This moves the issue of old shortcuts off the front burner.
    30 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following