
jhenke asked a question.
I just wanted to ask if there is an established or standardized script to start / stop the SLM or Inventory services for an on premise installation.
We occasionally see cases where not every service restarts after the reboot from Windows patching. Right now we RDP to the server and start these services. We'd like to monitor for this condition and automate a script to restart any Snow services that have not restarted. We can create this script (PowerShell) but are just wondering if there is already something like this available (if not officially endorsed or supported)
No such script available, self create and endorse 😉
Beside configure services recovery, I also have a script that check on hourly (remember to disable while doing SLM/INV upgrade).
Hi jhenke,
you can use Powershell to run the following commands
get-service -name snow* | start -service -verbose
get-service -name snow* | stop -service -verbose
get-service -name snow* | restart -service -verbose
I also use a scheduled task with the powershell commands after restart and once a day.
Please think of executing the commands twice, as some start or stop commands may fail due to service dependencies.
Hi,
You can use the following attached files to better monitor your Snow services.
referenced .exe files can be downloaded from https://learn.microsoft.com/en-us/sysinternals/downloads/pstools.
Note: manually run the 2 .exe files and accept the EULA before using the .cmd file
change the $logpath in RestartService.ps1 to the folder of your choice, try to use folder without <space>
change the filepath in tsMonitorSnowServices.cmd to the folder of your choice, try to use folder without <space>
Add extra services to SnowMonServices.txt by adding services' name and associated .exe.
Remove services from monitoring by deleting the entry or insert colon : in front of the entry.
Using Task Scheduler to schedule tsMonitorSnowServices.cmd - hourly, daily etc... as deem required.
For testing purpose - stop Snow service(s) and run tsMonitorSnowServices.cmd from cmd prompt where the files reside.