How to set logon script in group policy
In Active Directory if you want to run a script in when user login. you can do via Group Policy Objects (GPO).
1. Press Windows key + r for RUN.
2. when Run screen appears type gpmc.msc and press enter.
3. When Group Policy Management opens, right-click on Group policy object and select new.
4. When new GPO screen appears Type name and clicks on OK
5. when the policy template created right-click on policy template and select edit.
6. Navigate to User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff), then double-click Logon in the right pane.
7. In the Logon Properties window, click Show Files.
8. Copy files into this folder: your logon script (for example, Logon.bat) and close the Tab.
9. In the Logon Properties window, click Add.
10. Click on Browse to open the logon script directory, when directory open select your logon script file and click OK.
11. Verify the logon script now appears in the list on the Logon Properties window, then click on apply and OK.
11. Close the Group Policy Management Editor click on OU where you want to link that policy and right-click on OU and select Link an Existing GPO.
12. Select the policy and click on OK
13. After completing the above steps go to the user computer and logoff and login again for check.
1. Press Windows key + r for RUN.
2. when Run screen appears type gpmc.msc and press enter.
3. When Group Policy Management opens, right-click on Group policy object and select new.
4. When new GPO screen appears Type name and clicks on OK
5. when the policy template created right-click on policy template and select edit.
6. Navigate to User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff), then double-click Logon in the right pane.
7. In the Logon Properties window, click Show Files.
8. Copy files into this folder: your logon script (for example, Logon.bat) and close the Tab.
9. In the Logon Properties window, click Add.
10. Click on Browse to open the logon script directory, when directory open select your logon script file and click OK.
11. Verify the logon script now appears in the list on the Logon Properties window, then click on apply and OK.
11. Close the Group Policy Management Editor click on OU where you want to link that policy and right-click on OU and select Link an Existing GPO.
12. Select the policy and click on OK
13. After completing the above steps go to the user computer and logoff and login again for check.
0 Comments