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/04/01 15:48]
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.
  
-:!: Be sure that the file manager will display hidden files and will show file extensions before starting this procedure.+If you are implementing RDS, you 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 =====
- +
-:!: You must edit the files with elevated permissions.+
  
   - 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 30: Line 29:
         - Right-click the logon Script policy and choose **Edit**         - Right-click the logon Script policy and choose **Edit**
         - **User Configuration → Policies → Windows Settings → Scripts → Logon → Properties**         - **User Configuration → Policies → Windows Settings → Scripts → Logon → Properties**
-          - **Add -> Browse** 
-            - Right-click -> New File named ''logon.vbs'' 
-            - **Script Name** ''logon.vbs'' 
-            - **Script Parameters** ''config:global.conf'' 
-          - **Add -> Browse** 
-            - Right-click -> New Folder named ''config'' 
-            - Right-click -> New File named ''global.conf'' 
-          - **Add -> Browse** 
-            - Right-click -> New Folder named ''includes'' 
-          - **Remove** all but the first script (''logon.vbs''; the files and folders will remain in place) 
           - **Show Files**           - **Show Files**
-            +          **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.
- 
-<file> 
-C:\Windows\sysvol\sysvol\yourdomain.local\Policies\{1012B7DA-4DCA-4092-BEFF-8E3D2C9DC454}\User\Scripts\Logon 
-</file> 
  
 {{ :networking:windows:modular_logon_assign.png?direct&750 | }} {{ :networking:windows:modular_logon_assign.png?direct&750 | }}
Line 182: Line 167:
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
 +
 +==== Logon Script ====
  
 **Start -> Run -> %temp%** **Start -> Run -> %temp%**
Line 187: 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.1427924904.txt.gz · Last modified: 2015/04/01 15:48 by gcooper