Hi,
You can create a group policy to run a startup script. Please follow these steps:
- Open the Group Policy Management Console (GPMC): You can do this by typing
gpmc.msc
in the Run dialog (pressWin + R
to open the Run dialog). - Create a New Group Policy Object (GPO): Right-click on the domain or organizational unit (OU) where you want to create the GPO, and select "Create a GPO in this domain, and Link it here...". Give your GPO a name.
- Edit the GPO: Right-click on the newly created GPO and select "Edit". This will open the Group Policy Management Editor.
- Navigate to the Scripts (Startup/Shutdown) Section: In the console tree, go to
Computer Configuration
->Policies
->Windows Settings
->Scripts (Startup/Shutdown)
. - Add the Startup Script: In the results pane, double-click on "Startup". In the Startup Properties dialog box, click "Add". In the Add a Script dialog box, do the following:
- In the "Script Name" field, type the path of the script, or click "Browse" to search for the script file in the Netlogon shared folder on the domain controller.
- In the "Script Parameters" field, type the parameters you want (if any), exactly as you would type them on the command line.
- Specify Script Options: In the Startup Properties dialog box, specify the options that you want. If you assign multiple scripts, the scripts are processed in the order that you specify. You can move a script up or down in the list by selecting it and clicking "Up" or "Down".
- Apply and Close: Click "OK" to apply the settings and close the dialog boxes.
For more detailed instructions, you can refer to this link.
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.