This shows you the differences between two versions of the page.
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:// | + | Robb Dunn wrote this modular |
**Script**: http:// | **Script**: http:// | ||
- | **Howto**: http:// | + | **Official |
- | :!: There is a 5 minute delay in logon script processing. | + | **Server 2008 GPO**: https://www.petri.com/ |
- | **Eliminate | + | :!: There is a **5 minute delay in logon script processing**. Starting with Windows Server 2012 R2, there is a GPO that configures this delay. |
- | Robb Dunn wrote this modular VBS logon script | + | :!: If you are trying to **map a drive letter |
- | ===== Howto ===== | + | <note warning> |
- | :!: 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 |
- | :!: 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** | ||
- | - '' | + | - Create the logon script in '' |
+ | - Paste the contents of Robb's script and name it '' | ||
- **Group Policy method** | - **Group Policy method** | ||
- **Start -> Run -> '' | - **Start -> Run -> '' | ||
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 '' | ||
- | - **Script Name** '' | ||
- | - **Script Parameters** '' | ||
- | - **Add -> Browse** | ||
- | - Right-click -> New Folder named '' | ||
- | - Right-click -> New File named '' | ||
- | - **Add -> Browse** | ||
- | - Right-click -> New Folder named '' | ||
- | - **Remove** all but the first script ('' | ||
- **Show Files** | - **Show Files** | ||
- | | + | |
- Create two additional folders in the same directory called **' | - Create two additional folders in the same directory called **' | ||
- Create a configuration file in the **' | - Create a configuration file in the **' | ||
- | - Using either the Windows NT method or the Group Policy method, call the login script specifying the config file as an argument: '' | + | - Using either the Windows NT method or the Group Policy method, |
- | - 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. | ||
- | |||
- | < | ||
- | C: | ||
- | </ | ||
{{ : | {{ : | ||
Line 182: | Line 167: | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
+ | |||
+ | ==== Logon Script ==== | ||
**Start -> Run -> %temp%** | **Start -> Run -> %temp%** | ||
Line 187: | Line 174: | ||
* Look for logon_< | * Look for logon_< | ||
* 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' | ||
+ | |||
+ | - Run '' | ||
+ | * on the Domain Controller | ||
+ | * then on the affected machine | ||
+ | - Reboot the affected machine | ||
+ | - Test again | ||
+ | * '' | ||