Solved

login scripts

Posted on 2009-03-30
3
248 Views
Last Modified: 2013-12-05
I run login scripts for users to map drives, etc.
I recently setup a new server and moved the network folders to the new server
I edited the logon scripts so the drives will map to the new server and not the old server, e.g. net use g: \\newserver\folder
When the user log ons, the logon will not map the new drive, because the computer already has the drive letter mapped to the old server and will not map the drive letter e.g. net use g: \\newserver\folder
Is there a command I need to put in the logon script to un map the old drive and then map with the new drive mapping?  
I want to use the same drive letters when mapping to new server, for users shortcuts, etc.
0
Comment
Question by:danberry1010
  • 2
3 Comments
 
LVL 8

Assisted Solution

by:SCCMCanuck
SCCMCanuck earned 250 total points
ID: 24023790
Hey Danberry in our organization we create a simple .bat file and use the following command to map a drive letter:

@echo off
net use o: \\server-name\sharename /y

We then run a logoff script that removes the network drives on logoff using the following command

@echo off
net use o: /delete /y

Do this for each drive letter you wish to remove and it should achieve the desired results

You can also try adding the two statements combined in the logon script with the netword drive deletion commands running first as shown below, this should delte any o connections and re-map to the new share location:

@echo off
net use o: /delete /y
net use o: \\server-name\sharename /y

Let me know how you make out :)


0
 

Accepted Solution

by:
danberry1010 earned 0 total points
ID: 24024069
Thats the solution.  Thanks!
0
 

Author Comment

by:danberry1010
ID: 24024089
solution provided
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question