You can also schedule the task with schtasks.exe:
schtasks /s <computerName> /create /sc minute /mo 10 /tn "PowerShell Script"
/tr "C:\WINDOWS\system32\WINDOW~1\v1.0\powershell.exe c:\scripts\yourScript.ps1"
/ru <username> /rp <password>
More examples can be found here:
http://www.microsoft.com/resources/d....mspx?mfr=true
-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com Quote:
> i just wrote a script to do backups (with an imaging product) and now
> i want to make a script to deploy this and there are two things i need
> to do that im not really sure how to do.
>
> 1) create a schedule task with WMI (i want wmi so i can do it
> remotely)
> 2) create an account and add it to the admin group
> 3) modify the remote systems path enviornment var. (not a must, but
> would be
> nice)