![Lead Image © abidal, 123rf.com Lead Image © abidal, 123rf.com](/var/ezflow_site/storage/images/archive/2018/44/integrating-scripts-into-group-policy/po-26498-123rf-abidal_123rf_com-binary_robot_face_resized.png/150187-1-eng-US/PO-26498-123RF-abidal_123rf_com-Binary_Robot_Face_resized.png1_medium.png)
Lead Image © abidal, 123rf.com
Integrating scripts into Group Policy
Preprogrammed
Various kinds of scripts are available for automating tasks in Windows. These scripts start automatically when you log on or log off and when you boot up or shut down the computer. Microsoft offers various options for integrating scripts into Group Policy, which makes the administration of computers extremely flexible. In this article, I will show you how to make life easier with Windows scripts.
One example of centralized script usage is to assign Active Directory (AD) users logon scripts that a computer executes when the employee logs on. In many cases, the AD user account settings are used for this purpose. The scripts can also be quickly and easily integrated into Group Policy without any big changes. This allows you to split a large, long, and complex logon script into several small scripts and execute them quickly and easily.
In AD, there are basically five ways to assign scripts to your users or computers. You can also mix several script types and simultaneously store several scripts. Windows computers then run all these scripts in your specified order. The following variants are available for automatically executing commands when users log on or at computer startup:
1. The classic logon script is entered in the Profile properties and executes in a command prompt window that you can partially see. This script has nothing to do with group policies but can be used in parallel. However, it is best to integrate such logon scripts into the Group Policy.
2. Logon scripts in the Group Policy for users start when a user logs in. Normally, the user does not see the execution of the script because the window is hidden.
3. Logoff scripts in the user's Group Policy are executed when a user logs off.
4. User-independent scripts in Group Policy are executed at boot time in the background before a user logs on to the computer.
5. User-independent scripts in Group Policy run when the machine is shut down or restarted after the
...Buy this article as PDF
(incl. VAT)