— Mark @ Red Roof Inns
Hi Mark. Apologies for the barrage of unnecessary emails! Unfortunately Service Protector doesn’t know that it is OK for your service to be down while you are patching. It is diligently doing its job.
To avoid the false alarms, we recommend shutting down Service Protector at the start of your maintenance window and reactivating it once patching has concluded. These operations can be performed from the Service Protector GUI or with the standard Windows NET command.
You see, Service Protector creates a Windows Service for each service it monitors. If your service is named “MyService”, then Service Protector creates a service called “ServiceProtector: MyService” to watch your target service. Here is what it looks like for the “Print Spooler” service on our Windows Server 2016 machine:
Note that the service name may not be the same as the friendly “display name” you see in Service Protector (and Services.msc). For example, the service name of the “Print Spooler” service is actually “Spooler”:
This post shows how to find the service name.
How to Stop Protection at the Start of Maintenance
Stopping From the GUI
Select Stop <ServiceName> from the Protector menu. This will shut down Service Protector but will leave your target service running:
Stopping From the Command Line
This command will stop the instance of Service Protector monitoring a service named “MyService”:
NET STOP “ServiceProtector: MyService”
Here is what the process looks like for the Spooler service:
Simply run the NET STOP command before patching starts.
How to Restart Protection at the End of Maintenance
Starting From the GUI
Select Start <ServiceName> from the Protector menu. This will fire up Service Protector — and your target service if it’s idle:
Starting From the Command Line
A slightly different version of the NET command will restart the instance of Service Protector monitoring a service named “MyService”:
NET START “ServiceProtector: MyService”
Restarting protection for the Spooler service looks like this:
Run the NET START command once your system is back to normal.
How to Stop and Restart Service Protection Automatically
For patching that occurs at a defined time, we recommend using the Windows Task Scheduler to automate the process. Create a pair of scheduled tasks — one to stop protection and the other to restart it.
For example, if maintenance occurs every Saturdays from 1 AM to 3 AM, your first scheduled task could run NET STOP at 12:59 AM. The second task could be configured to run NET START at 3:01 AM.