Redirect mapped drives

5 pts.
Active Directory
Login scripts
Mapped drives
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.

Tthis may sound silly but try this:

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

Am I missing something?


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)

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

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.
  • 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:
  • 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 This moves the issue of old shortcuts off the front burner.
    30 pointsBadges:

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.

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


Share this item with your network: