![]() This is where we configure what our scheduled task will run. You can configure additional triggers if you like, say for the script to run every day on a specific time. This ensures that our Powershell script will run when the computer starts. ![]() Also select “Run with highest privileges” to make sure this task is run under the system context.Ĭreate a new trigger and set “at logon” as the trigger. (Click Change User or Group, type in System and click Check Names). I also specify “NT AUTHORITY\SYSTEM” as the user account. Selecting replace as the actions ensures that this scheduled tasked is created if not found, and any changes made to it later will be applied when group policy is renewed on the clients. Create a scheduled task (at least Windows 7). Group Policy: Computer Configuration -> Preferences -> Control Panel Settings – Scheduled Tasks. Local machine: Start “Task Scheduler” and create a new task. Powershell Script with Arguments as a Scheduled Task A scheduled task deployed with group policy is the best way to set this up and fulfill all these requirements. I also run it once a day on my customers. Some of the checks it does requires it to run in the system context, and it is also recommended to run it as a startup script. I created this blog post as I got several questions how to set up my client health script. This guide explains how to run a Powershell script with arguments as a scheduled task and how to deploy it with group policy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |