Skip to content

Instantly share code, notes, and snippets.

@aev-mambro2
Created March 28, 2022 17:43
Show Gist options
  • Save aev-mambro2/49155a1e463188120a800846cb099ab6 to your computer and use it in GitHub Desktop.
Save aev-mambro2/49155a1e463188120a800846cb099ab6 to your computer and use it in GitHub Desktop.
How to start Windows Task Scheduler as System
psexec -accepteula -i -d -s mmc taskschd.msc
@aev-mambro2
Copy link
Author

Some scheduled tasks are protected by the Windows System and can only be changed by the System account. So, how do we do that? By acting as the System account. We can do that using a Microsoft tool (created by SysInternals), named PSExec. It is part of the Microsoft PSTools suite. You can find it here: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec

The kicker is the command-line switch -s. That activates the built-in System account.

Use sparingly and only if you have no better option. Know what you're doing. I am not responsible for your fuck-ups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment