[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Re-mapping Corporate shared drive on win 2000-2003 mixed domain.

I have just added a file server to our corporate network.  Belive it or not our 60gb shared area is currently located on our web server. so purchasing a dedicated file server was a proiority.  
a root level share called "Share" is mapped on every workstation as the S: drive.  This drive is used in some way by everyone in our organization.

What i need is a foolproof....works the first time....works everytime... method to, at the next user logon delete the old S: drive mapping from \\Webserver\Shared and remap it to \\Fileserver\shared

All the current drive mapping were done manually as the comapny has grown (we put a system in service we map the S: drive as part of the original config)

We made a brief attempt at setting up a logon script in the Group Policies but it was a disaster.  all it really ever consistantly managed to do was delete the S: drive mapping.

I really need this to go seamlessly.  Any help would be appreciated.

Thanks in advance

500 points cause this is important and i need it fast !
0
mnichols1202
Asked:
mnichols1202
  • 4
  • 2
2 Solutions
 
luv2smileCommented:
You should be able to use this as a login script:

logon.vbs

'Remove drive if mapped already
If FileSysObj.DriveExists("s:")=True then
    objNetwork.RemoveNetworkDrive "s:"
End if

'Map drive for all users
objNetwork.MapNetworkDrive "s:", "\\fileserver\share"
0
 
mnichols1202Author Commented:
Awsome,  But i have a few questions.

this is a vbs file?  do i put it in a bat file?
how do i ensure it runs for everybody?  if i put it in the top level Group policy will it "trickle down" to the lower level policies.

is there a way to test this before deployment?

Thanks.
0
 
anil_uCommented:
Hi,
You can use a logon script, just copy it to the sysvol folder and in active directory users and computers, edit the user so that it runs the script.

The script can be in a batch file

1. To remove the drive

NET USE s: /DELETE

2. To map the drive
This syntax will recreate a mapped networkdrive at each startup :
net use s: \\Fileserver\shared /persistent:NO

If there is a username and password for the drive then
net use s: \\Fileserver\shared password /user:domain\username /persistent:NO
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
anil_uCommented:
Regarding luv2smile suggestion and your question
Once the file has been created, create a batch file by
Opening notepad
cscript logon.vbs
then simply save it as logon.bat
You can then use it as any other batch file

And yes, place this on the highest OU and it will filter down for all users

As a test, create a test OU, add another OU inside that, then place a user in each OU and watch it work :)

0
 
mnichols1202Author Commented:
anil_u and All,

Thats exactly what we tried in our earier attempt several months ago,  I managed to delete the drive well enough but it only managed to re-map the drive on the rare occasion.  Any thoughts on how to test this thing so it appears nothing has changed for the end user?  I really need to be sure of this cause it's my @$! if this thing doesn;t work!  : )  Plus if i manage, like last time, to delete everyones maps i have well over 200 workstations to manually remap...again!

Also Deleteing and remapping at each logon - seems dicy  - a persistent map would be better - and a way to check the current mapping...if it's ok then don't do the remap.

0
 
anil_uCommented:
Yes I agree, You may want to run two scripts, one to remove the drive (this can be run once) and one to check if it exists and if not then add it

Here a batch file that will check if it exists and if not then map it

IF EXIST S:\NUL GOTO EXIT1

:USE_S
net use s: \\Fileserver\shared /persistent:NO

:EXIT1
QUIT


More info
http://support.microsoft.com/kb/q65994/

There are ways to exclude policies from propagating through the OU, but this is just a logon script that would be run everytime a user logs on, so not sure why this would not run
0
 
anil_uCommented:

Glad I could help

Thanks
Anil
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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