how to execute a logon script for domain user

Microsoft Windows server 2008 standard -...
September 26, 2010 at 05:16:04
Specs: windows server 2008 standard, amd64 2gb
i've taken a logon script from the web and modified it for my needs, the script is as follows:

filename: logon.vbs (written in notepad)


Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "M:" , "\\beavis\music"
objNetwork.MapNetworkDrive "P:" , "\\beavis\photos"
objNetwork.MapNetworkDrive "O:" , "\\beavis\office docs"


if i run this script locally on my xp pro sp3 laptop it maps the drives which i'm really pleased about

however, i'd like the script to be executed when domain users logon to my windows server 2008 standard domain controller

in the profile tab of the domain user i have tried the following but so far no luck getting it to run:


user profile

profile path:
logon script: \\BEAVIS\scripts\logon.vbs

home folder

local path:
connect: H: to: \\BEAVIS\jamesmeader


the home folder works :-)

i have also tried changing the logon script box to:

logon script: C:\scripts\logon.vbs


i'm new to scripts and active directory and servers and i hope this is not a stupid question!

See More: how to execute a logon script for domain user

Report •

September 26, 2010 at 08:05:17
i've fixed this myself

i renamed the script to netlogon.vbs

moved it to the sysvol\scripts folder because thats the default location for AD to run scripts

then changed the following:

logon script: netlogon.vbs


Report •

October 1, 2010 at 07:07:34
You can also go in to your group policy and add scripts to execute on Start up, or log in so as to not modify the default logon script the server may be trying to use?

In Group Policy Object Editor, open your default policy (Or whatever policy you are trying to implement this to)

For When PC starts up regardless of who signs in after booting:
Computer Configuration - Windows Settings - Scripts (Startup/Shutdown)

Or for implementing to specific users after they sign in based on WMI filters etc:
User Configuration - Windows Settings - Scripts (Logon/Logoff)

Here you can implement as many scripts for whatever and then implement them based on the OS the computer is running or logon credentials of the users etc.

Then run gpupdate to apply changes immediately

Report •

Related Solutions

Ask Question