View Single Post
Old 11-26-2007   #3 (permalink)
Chris


 
 

Re: schedule a task with WMI?

To create the tasks remotely use the following WMI class:

Win32_ScheduledJob

It has a method create, by using this method you can create a
schedule.

Details:

http://msdn2.microsoft.com/en-us/library/Aa394399.aspx


regards

On 24 Nov., 13:02, Desmond Lee <m...@xxxxxx> wrote:
Quote:

> Justin,
>
> One simple way is to use Control Panel > Scheduled Task to call a batch file
> (*.bat or *.cmd) that will launch the actual *.ps1 script. Make sure that the
> account has the right credentials to connect and function remotely on the
> target machine.
>
> Hope this helps. Do let us know. Thanks!
>
> --http://www.leedesmond.com/weblog/
>
> "Justin Rich" wrote:
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.
>
Quote:

> > 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)
My System SpecsSystem Spec