Hi Adkwiat,
Thank you for posting in the Microsoft Community Forums.
Using Group Policy (GPO) allows administrators to configure a variety of settings and scripts on computers within a domain.
To create or edit a GPO.
Open the Group Policy Management Console.
Right-click on the Domain or Organizational Unit (OU) and select “Create a GPO in this domain and link it here”.
Name the new GPO and click OK.
Configure the startup/logon script:
Edit the new or existing GPO and navigate to “Computer Configuration -> Policies -> Windows Settings -> Scripts (Startup/Shutdown)” or “User Configuration -> Policies -> Windows Settings -> Scripts (Logon/Logoff)”.
Add startup or logon scripts (e.g. PowerShell scripts) that will be executed when the computer starts up or the user logs on.
Configure the task schedule:
In GPO, navigate to “Computer Configuration -> Preferences -> Control Panel Settings -> Scheduled Tasks”.
Create a new scheduled task and configure triggers and actions to run specific scripts or programs.
Best regards
Neuvi Jiang