Solved

Batch file Deployment by Group Policy

Posted on 2014-03-17
6
2,555 Views
Last Modified: 2014-03-24
Hello,

I have created a batch file that is to be used to restart a service. I would like to deploy a group policy to run this file twice daily on all machines in one of my OUs.  Is it possible to create a new policy and configure a scheduled task under Computer Configuration, then link to the OU?

I need a little guidance on this one.

Thanks
RD.
0
Comment
Question by:BadToro
  • 3
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
Joseph Moody earned 500 total points
ID: 39934132
Sure!

You will want to use Group Policy Preferences Scheduled Tasks to create the task and Group Policy Preferences Files to copy the batch file locally.

Here is a guide that shows how to create scheduled tasks:

http://deployhappiness.com/poor-mans-free-group-policy-monitoring/
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39938600
Please be aware that there's one terrible error one could make: if you happen to have vista machines on your network, don't deploy windows 7 style tasks to them, it will break their whole scheduler (reproducible).
0
 

Author Comment

by:BadToro
ID: 39940537
Hi, sorry for taking so long.  I was away from the office for a while.  Thanks for the link, it was helpful but I have another query.  How do I set a random delay on the task schedule?  I don't see this option when scheduling the task via group policy.

Thanks!
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39941069
This option can be seen if you use "at least windows 7"-style tasks. The oldschool xp tasks don't know this option (neither does xp as a client).
0
 

Author Comment

by:BadToro
ID: 39945803
Thanks McKnife.  Not to serious I just found it odd, I have 2 x 2k8 windows servers.  On one of them, I have a newer version of task scheduler which includes the option and on the other server - only the legacy version which does not.

Just found it odd and unfortunately, its the domain with the legacy version that I have to deploy the policy.

Best Regards and thanks for the help.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39945900
Use RSAT and connect from win7. Then, all settings you need are present.
0

Join & Write a Comment

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now