Solved

login scripts

Posted on 2009-03-30
3
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

687 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