User Tools

Site Tools


networking:windows:logon_script_modular

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:windows:logon_script_modular [2015/09/15 17:23]
gcooper
networking:windows:logon_script_modular [2023/12/14 08:30] (current)
gcooper
Line 1: Line 1:
 ====== Modular Logon Script ====== ====== Modular Logon Script ======
  
-http://ninp.snappages.com/blog/2010/03/03/332010-modular-logon-script-download+Robb Dunn wrote this modular VBS logon script that solves most small business needs easily.
  
 **Script**: http://community.spiceworks.com/scripts/show/299 **Script**: http://community.spiceworks.com/scripts/show/299
  
-**Howto**: http://community.spiceworks.com/how_to/show/1189+**Official Howto**: http://community.spiceworks.com/how_to/show/1189
  
-:!There is a 5 minute delay in logon script processing Starting with Windows Server 2012 R2, there is a GPO that configures this delay.+**Server 2008 GPO**https://www.petri.com/setting-up-logon-script-through-gpo-windows-server-2008
  
-**Eliminate 5-minute delay in logon script processing**http://www.itsupportkb.com/windows-2012r2/gpo-logon-script-not-running-windows-server-2012r2+:!: There is a **5 minute delay in logon script processing**.  Starting with Windows Server 2012 R2, there is a GPO that configures this delay.  http://www.itsupportkb.com/windows-2012r2/gpo-logon-script-not-running-windows-server-2012r2
  
-Robb Dunn wrote this modular VBS logon script that solves most small business needs easily.+:!: If you are trying to **map a drive letter that is already mapped** to something else, you will want to **disconnect that previous mapping** so the new mapping will occur.
  
-===== Howto =====+<note warning>For some reason, using Group Policy to run the logon script does not work on RDS servers though it does seem to work properly on regular workstations.
  
-If a group policy (GPO) doesn't seem to take effectrun ''gpupdate /force'' from an administrative command prompt...even on the Domain Controller.+If you are implementing RDSyou probably want to implement the logon script the old Windows NT way specifying the script in the Profile tab of users in ADUC.</note>
  
-:!: Use the Windows NT method...it always works.+===== Howto =====
  
   - Download and copy the logon.vbs file to the the appropriate folder on the domain controller where the script will be run.   - Download and copy the logon.vbs file to the the appropriate folder on the domain controller where the script will be run.
     - **Windows NT method**     - **Windows NT method**
-      - ''C:\Windows\SYSVOL\sysvol\domain.local\scripts''+      - Create the logon script in ''C:\Windows\SYSVOL\sysvol\domain.local\scripts'' 
 +      - Paste the contents of Robb's script and name it ''logon.vbs''
     - **Group Policy method**     - **Group Policy method**
       - **Start -> Run -> ''gpmc.msc''**       - **Start -> Run -> ''gpmc.msc''**
Line 29: Line 30:
         - **User Configuration → Policies → Windows Settings → Scripts → Logon → Properties**         - **User Configuration → Policies → Windows Settings → Scripts → Logon → Properties**
           - **Show Files**           - **Show Files**
-          - **Create the file 'logon.vbs'** with Robb's script as the contents+          - **Create the file ''logon.vbs''** with Robb's script as the contents
   - Create two additional folders in the same directory called **'configs'** and **'includes'**.   - Create two additional folders in the same directory called **'configs'** and **'includes'**.
   - Create a configuration file in the **'configs'** folder named **'global.conf'**.   - Create a configuration file in the **'configs'** folder named **'global.conf'**.
-  - Using either the Windows NT method or the Group Policy method, call the login script specifying the config file as an argument: ''logon.vbs config:global.conf'' +  - Using either the Windows NT method or the Group Policy method, modify users in ADUC to call the login script specifying the config file as an argument: ''logon.vbs config:global.conf'' 
-    - Note the spelling+    - Note the exact spelling
   - Use the detailed log files generated to troubleshoot and verify script execution.   - Use the detailed log files generated to troubleshoot and verify script execution.
  
Line 166: Line 167:
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
 +
 +==== Logon Script ====
  
 **Start -> Run -> %temp%** **Start -> Run -> %temp%**
Line 171: Line 174:
   * Look for logon_<your-conf-file>.log for login details.   * Look for logon_<your-conf-file>.log for login details.
   * If you don’t see the logfile here, then you know that the script did NOT run.   * If you don’t see the logfile here, then you know that the script did NOT run.
 +
 +==== Group Policy ====
 +
 +If a group policy (GPO) doesn't seem to take effect:
 +
 +  - Run ''gpupdate /force'' from an administrative command prompt
 +    * on the Domain Controller
 +    * then on the affected machine
 +  - Reboot the affected machine
 +  - Test again
 +    * ''gpresult /r''
  
networking/windows/logon_script_modular.1442359414.txt.gz · Last modified: 2015/09/15 17:23 by gcooper