Learn More Download Free Trial Pricing & Buy

If spoolsv is in error state

Yesterday  explained how to restart spoolsv server (printer spooler) if it exceeds 40MB of memory.
Sometimes spooler service will hang and there will not be high memory consumption, so we would need to detect that problem as well. For this scenario I have written the following script:
net start | findstr /i Spooler > nul
if not errorlevel 1 goto end
net stop Spooler
sleep 2
net start Spooler
:end
exit

I created a scheduled task to run this script under system every minute, for 24 hours a day. If spoolsv is OK, the script will just close, and  if it is in error state, the script will restart the printer spooler service.

Tags:


One Response to “If spoolsv is in error state”

  1. Lionel Schotter says:

    Hi,

    You mention in the foreword of this post that you explained “yesterday” how to reset the spooler if it exceeds 40MB, does this script do the same thing? Is there a seperate script for that or is there a combined script perhaps?

    Regards

    Lionel

Leave a Reply