Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to schedule a powershell script to run on my windows 7 system everyday with admin priviliges.
How do I do so?

share|improve this question

1 Answer 1

You can use schtasks, from an elevated CMD prompt.

eg.

schtasks /create /tn "My Task Name" /ru Administrator /sc daily /sd 28/05/2011 /st 14:00 /tr "powershell.exe -noprofile -executionpolicy RemoteSigned -file %MyPATH%\MyTaskScript.ps1"

This would run the script at 14:00 every day.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.