Assigning Logon/Logoff and Startup/Shutdown Scripts in a GPO

Assigning Logon/Logoff and Startup/Shutdown Scripts in a GPO


You want to assign either user logon/ logoff scripts or computer startup/shutdown scripts in a GPO.


Using a graphical user interface
  1. Open the GPMC snap-in.

  2. In the left pane, expand the Forest container, expand the Domains container, browse to the domain of the target GPO, and expand the Group Policy Objects container.

  3. Right-click on the target GPO and select Edit. This will bring up the GPOE.

  4. If you want to assign a computer startup or shutdown script, browse to Computer Configuration Windows Settings Scripts. If you want to assign a user logon or logoff script, browse to User Computer Windows Settings Scripts.

  5. In the right pane, double-click on the type of script you want to add.

  6. Click the Add button.

  7. Select the script by typing the name of it in or browsing to its location.

  8. Optionally, type any script parameters in the Script Parameters field.

  9. Click OK twice.


When you assign a script in a GPO, you can either reference a script that is stored locally on the domain controller somewhere under the SYSVOL share, or in a UNC path to a remote file server. The default storage location is in the SYSVOL share in the <DomainName>\scripts foldere.g., \\\sysvol\\scripts. The logon script can also be set as an attribute of the user object (scriptPath). This is provided as legacy support for users migrated from NT 4.0 domains and requires the script to be stored in the Netlogon share. You should choose one method of specifying the logon script or the otherbut not both, as this will cause the logon script to run twice.

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows