Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts



How to setup a logon script on your Windows 2000/2003 Active Directory Network

by Steve Wiseman on May 10, 2006 · 10 comments

in Windows


Setting up a logon script in active directory is not always that simple. Lets walk through it.

First, open “Active Directory Users and Computers” on the domain controller

Now right click on the user you want to have the logon script and select the properties menu.

A properties dialog like the one shown below will appear. Select the ‘Profile’ Tab

Here is the confusing part. If I just put any old batch file name in the logon script field, where does windows try to find it from?

Lets find out. First, type in this field ‘logon.bat’

Click OK.

Now, we need to find the folder where the server loads logon scripts. It follows this format:

\\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts

So, if my server was named DCServer1, and my domain was, we would browse to this path:


Now that we know where to put it, creating the script is easy. Just open up notepad, and write your batch file. For our test batch file we will put in a line that loads our profile generator for Microsoft Outlook XP

We are done with the script, so we save the text file as:


Now, the next time this user logs in, they will load the login script.

One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

{ 10 comments… read them below or add one }

1 Naw Aung December 1, 2009 at 5:21 am

How to write auto script log on in windows 2003 server

If you have any idea please help me

2 David January 5, 2011 at 4:57 pm

What do you need help with?

3 ken March 9, 2011 at 9:08 am

Thanks for explaining

just wondering how to display a notice when a user log on to network, and how to map network drive through script

4 mark February 8, 2012 at 3:17 pm

I believe I followed the post instructions exactly. My client machines have limited security/user rights/priveleges.

What security/user rights/priveleges must clients have to be able to use the logon script set in active directory?

My script is a .bat file, containing one line that maps a network drive:

“NET USE X: //server/share \USER:username passw”

but when I log on to client the drive isn’t mapped.

5 Steve Wiseman February 9, 2012 at 10:24 am

I don’t think there are any limits to who can have a login script. Make sure you are setting it up as a user group policy, and not a computer one…since those in the computer context are run as ‘system’ and ‘system’ cannot map network drives

6 Lany July 3, 2012 at 10:13 pm

“NET USE X: //server/share \USER:username passw”


“NET USE X: \\server\share /USER:username passw”

please try the last one


7 Sonnie Ukhuedoba August 1, 2012 at 10:22 am

I appreciate you for this script

8 Jr August 15, 2012 at 10:57 am

Hi, Thanks for the tips Steve.
I was wondering is someone can help me with creating a logon scrip that does:

1. Screen saver should be password protected after 5 minutes on inactivity.
2. Disconnect the wireless, if it is connected (since it will be connected via Ethernet)
3. Add shortcuts for Word, Excel, Outlook, IE, Adobe, My computer
4. Word – setup the defaults for documents and auto recovery to point to the \\P drive
5. Excel – setup the default for documents to point to the \\P drive
6. Set homepage to
7. Outlook – when setting up, please be sure the box is deselected for Using Cache
8. Outlook – set to not auto archive
9. Disable Offline files
10. Add Endpoint
11. Add Signature pad software


9 Andrey April 3, 2013 at 2:32 am

Can i get users from specific OU by scripting?

10 Rakesh November 27, 2013 at 2:39 am

Hello All,

I have already mapped the share drive. But there is a problem . Today the end user updating some file in map drive that is not showing the updated file on next day.i unable to shut it out the problem can some body help me sir.

I am crest the domain in 2012 server and the share folder also.

Please help me

Leave a Comment

Category Links - Windows Forum - Exchange Forum