Remotely restart print spooler (+ other services)
Print Server is nicely set up, I've got a script to add the printers from the print server and remove all the local printers as they're no longer needed. I've set up Papercut Print Logger and sorted out access rights to shares/etc so that the Assistant Head (who is the most computer literate lady here) and the Head can check the print logs.
Before I action all of this, I want to give them a way to restart the print spooler should it ever fall over, jobs getting stuck, etc, since I'm not here too often. Apparently, this should work..
(Stop Papercut, stop Spooler, delete all files from \\...\System32\spool\PRINTERS on the server to clear the queues, start Spooler, start Papercut)
sc \\HWP-PrintServernet stop PCPrintLogger
sc \\HWP-PrintServernet stop Spooler
del /Q /F \\HWP-PrintServer\Spooler$\*.*
sc \\HWP-PrintServer start Spooler
sc \\HWP-PrintServer start PCPrintLogger
However, each of the sc \\HWP-PrintServer commands returns the following:
[SC] OpenSCManager FAILED 1722:
The RPC server is unavailable.
Google tells me everything from 'It's a virus' to 'Ensure File and Printer sharing is enabled' (it is) and I'm a little stuck as to where I go from here. Anybody encountered this kind of thing before? I know I could allow RDP but I don't think they'll be too confident doing that, so I'd rather just wrap it up in a nice little file they can double-click and be done with, where possible.