Link to home
Start Free TrialLog in
Avatar of Bill H
Bill H

asked on

Script to restart service

Hi Guys,

I need a script that will restart a specific service every 12 hours for server 2008 r2.
ASKER CERTIFIED SOLUTION
Avatar of jerseysam
jerseysam
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can do this vary easily with powershell...
See the below example...

restart-service -Name BITS

Open in new window


Save the script as Restart.ps1

Launch a Powershell Script from Task Scheduler
http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx

Will.