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

link|improve this question

56% accept rate
feedback

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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