Solved

server 2008 login script

Posted on 2010-08-22
21
523 Views
Last Modified: 2012-08-13
Is there a way to use the net use command in server 2008 or another way to map a network drive upon login so that you are not prompted if the drive is already mapped to overwrite it. It will automatically do this without prompting the user. We have group policies in effect and one of rules to map a drive for everyone doesn't always work so I'm trying to find a work around rather than trying to fix the group policy. We've spent enough time and money on figuring out the group policy problem with gpupdate.
0
Comment
Question by:sraley
  • 10
  • 6
  • 3
  • +1
21 Comments
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 250 total points
ID: 33496763
Delete the connection if it exists then remap.

If Exist x:\ NET USE /DELETE x:
net use x: \\server\share /PERSISTENT:NO
0
 
LVL 7

Assisted Solution

by:stephen_c01
stephen_c01 earned 250 total points
ID: 33497030
using the above code make a new text file and call it, mapdrive.cmd

and put in

If Exist x:\ NET USE /DELETE x:
net use x: \\server\share /PERSISTENT:NO


If you want to have it happend for 1 user, add it to that users start up folder in the start menu, if you want to happen for all users who logon to the server put it in the all users->startup folder.
0
 
LVL 13

Expert Comment

by:George Sas
ID: 33497068
Sorry to bug in stephen_c01 :) but  no need to copy the files on the local machines etc ...
He is working with GPO's so I guess he can just add the script to the logon script or even to a GPO targeted on spcific ou or so.
0
 
LVL 7

Expert Comment

by:stephen_c01
ID: 33497093
but he said he didnt want to mess with the GPO, so i was giving an alternative.
0
 
LVL 13

Expert Comment

by:George Sas
ID: 33497105
He can just specify a "Logon Script" under the users Profile tab in AD.
0
 

Author Comment

by:sraley
ID: 33497341
yes i'd put it in the users profile in AD but does it have to be call .cmd or is there any specific extension needed?
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 33497391
The commands I posted are command line commands so they would have to be saved in a text file with a .cmd extension
0
 
LVL 13

Expert Comment

by:George Sas
ID: 33497446
You can call it .cmd , .bat , .vbs etc.
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 33497451
You cannot call it .vbs - that's for Vbscripts - not batch scripts.
0
 
LVL 13

Expert Comment

by:George Sas
ID: 33499192
If your logon script it's a vbs script you can call it vbs
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:sraley
ID: 33614156
I haven't been able to try the script because someone said the password on the server expired and they changed it, but what is written down isn't working. Our ilnux boot disk that we have used on 2003 servers to reset the administrator password has worked before but in 2008 it gives an error that my partition is read only and cannot fined the system32 folder. Any ideas on a linux reset password boot utility?
0
 
LVL 13

Expert Comment

by:George Sas
ID: 33615615
Reboot the system and at the boot press S on the console. this should boot it in safe mode.
0
 

Author Comment

by:sraley
ID: 33616679
What is safe mode going to help me do?
0
 
LVL 13

Expert Comment

by:George Sas
ID: 33616801
reset the root password.
0
 

Author Comment

by:sraley
ID: 33645105
That option requires that I already have created a usb reset password policy which I have not. So I guess I have to find another 2008 enterprise server and create this file on the usb stick?
0
 

Author Comment

by:sraley
ID: 33645589
the local admin password that is still taped to the side of the machine isn't working either regular or safe mode using the server/administrator login name. I'm unable to use some of the links I found in here and on Petri to reset the password. I can't boot into safe mode command prompt to try net user since I have to enter the password to get into the dos prompt.
0
 

Author Comment

by:sraley
ID: 33648070
well I just found a linux boot clear password cd dated June 2010 that says it works on 2008/win7 and it told me it cleared the administrator password and saved the same. I leave password blank for both domain and local admins and can't get in. Incorrect password.
0
 

Author Comment

by:sraley
ID: 33715186
I made a password reset usb disk from another 2008 machine, it recognizes it and asks me to input new password which I do and then I get an error that it can't change the password. any ideas on exporting the login script and gpo's that I've spent so much time and money getting created?
0
 

Author Comment

by:sraley
ID: 33762351
anyone know how to get the gpo and items off the server manually since I can't log in to fix the login script and i'm unable to reset the password?
0
 

Author Comment

by:sraley
ID: 33827070
any other ideas on password resetting or how to get my GPO's /config out if I have to wipe this server?
0
 

Author Comment

by:sraley
ID: 33868632
Finally got the administrator password resolved and working on script now.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now