• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Schdduleing a Script to run via group policy

Title pretty much says it all.

I need to schedule a script to run, on all workstations, from a shared location, at a set time every month.

Id like to put the script in say c:\stuff on the server, share the folder out

and then have it run on the 15th of every month, on every workstation in the domain.

If it matters, the script is a VBS script.  I need a solution that works for Server 2003 and Server 2008, or atleast.. seperate solutions for both.

Thank you in advance experts.
0
JiffyZ
Asked:
JiffyZ
  • 5
  • 5
  • 2
  • +1
1 Solution
 
Justin OwensITIL Problem ManagerCommented:
Well, you will run into a couple of challenges either way, but the solution is the same methodology....

UNC paths (\\servername\sharename\script.vbs) are the way to go in a Scheduled Task.  You will need to assign the Task to a user account which has permissions on the share and also on all the servers.

It should work fine if you do that...

Justin
0
 
JiffyZAuthor Commented:
We have had problems in the past with log on scripts, scheduling tasks and then they endlessly schedule, endless tasks, everytime the user logs on.

This is due to the way we set it up no doubt, but what it the proper way to do this, so that duplicate tasks are not created everytime the user logs on?
0
 
JiffyZAuthor Commented:
I could also use the clarity on how and where to set this up in Group policy.  Such as.. under computer policy, user policy etc.

I know under preferences, I can go to Control panel, and then scheduled tasks, is this the proper place to put this?
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
enriquecadalsoCommented:
You can delete the previous task and recreate it every time.

http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_23439285.html
0
 
enriquecadalsoCommented:
Another appoach is to control the schedule in the server. Configure the workstations to run an empty script and replace this empty script on day 15 every month with your script. On day 16 put the empy script again.
0
 
Justin OwensITIL Problem ManagerCommented:
Here is a good walkthrough on using GPO to create scheduled tasks.  You would apply this to Computers and not Users.  On the Run As section is where you would set your security.

http://technet.microsoft.com/en-us/library/cc725745.aspx

Justin
0
 
Donald StewartNetwork AdministratorCommented:
You could use server 2008 to deploy the scheduled task to all
 
http://technet.microsoft.com/en-us/library/cc725745.aspx 
0
 
Donald StewartNetwork AdministratorCommented:
forgot to refresh before posting.....LOL
0
 
JiffyZAuthor Commented:
Thanks, I did want to use preferences to deploy the task.  I tried this on test domain and I believe I had it set up correctly, however, when I opened sceduled tasks on a workstation, I was unable to see the scheduled task.  Is this because I assigned it to the computer side of the policy? Is there a way I can check to see if this task has been scheduled properly on an individual workstation?  

I went to Group policy -> computer policy -> preferences > control panel > scheduled tasks

Set it up to run from the remote location via UNC path and for Run As, I gave domain admin credentials.

Is this correct? I could not see the task set up on the local workstations under scheduled tasks.

Thanks!
0
 
Justin OwensITIL Problem ManagerCommented:
Happens to the best of us... :)
0
 
Justin OwensITIL Problem ManagerCommented:
What is the OS of your workstations?  You may need to install the CSE for the OS...

GPP CSEs for Windows Vista (KB943729)
GPP CSEs for Windows Vista x64 Edition (KB943729)
GPP CSEs for Windows Server 2003 (KB943729)
GPP CSEs for Windows Server 2003 x64 Edition (KB943729)
GPP CSEs for Windows XP (KB943729)
GPP CSEs for Windows XP x64 Edition (KB943729)

Let me know if those links don't work for you.  Windows 7 already has the CSE (Client Side Extensions) for AD 2008 enhancements.

Justin
0
 
JiffyZAuthor Commented:
Aha! So...

For the preferences to work, I need to download the appropriate GPP kit for the operating system of each PC?

This is for 2008 only correct?  So for 2003, how can I accomplish this?
Thanks!
0
 
Justin OwensITIL Problem ManagerCommented:
Scheduled tasks at GPO is an extension of AD that did not exist before 2008.  To make it work, you need to add the CSEs to the workstations on which you want the scheduled task to run.  Administer it from your 2008 server as you have been.  There is nothing to add to Server 2008 or Windows 7, just the clients I listed above.

Justin
0
 
JiffyZAuthor Commented:
Awesome answers, Thank you!
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 5
  • 5
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now