About
Pricing
Community
Teams
Start Free Trial
Log in
Cobra25
asked on
7/22/2015
Script to restart service
Hi Guys,
I need a script that will restart a specific service every 12 hours for server 2008 r2.
Windows Server 2008
Scripting Languages
Microsoft Server OS
2
1
Last Comment
Will Szymkowski
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
jerseysam
7/22/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Will Szymkowski
7/22/2015
You can do this vary easily with powershell...
See the below example...
restart-service -Name BITS
Select all
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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
See the below example...
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.