We help IT Professionals succeed at work.
Get Started

How to check if a service is running and stop a shutdown via a script

Last Modified: 2012-08-14
Hi Experts,

Im having a bit of an issue with both my servers. One is running SBS 2003 and the other is running server 2008 standard.

Both are running StorageCraft ShadowProtect backup software.  We are also backing up our servers off-site into a backup data centre.

The problem i am having, is when there is a windows update, or a power outage the server reboots or shuts down.

With ShadowProtect, if the backup job is not completed successfully or aborted from the console. It causes the system to do its next backup via VDIFF. This is my problem, when this happens the back goes from taking seconds or minutes, to days.

What i am looking for is a script that will allow me to check and see if the state of the shadowprotect backup is in the process of running and if so, execute an abort so once it is aborted the server can continue to shutdown as it normally would.

Like this once the server comes back online, it wont know any difference and just send the next increment over to the data centre.

I know this solution may be made of a few different solutions, but everyone who helps, thank you in advance.

Watch Question
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE