https://github.com/vletoux/SpoolerScanner
Check if the spooler (MS-RPRN) is remotely available with powershell/c#.
As an alternative, it can be tested by OpenPrinter but the API does not clearly expose if the parameter is incorrect or if the service is unaccessible.
My understanding of the spooler API is:
- if you share a printer on the network, the spooler is remotely accessible on the computer sharing the printer
- on a domain, the DC spooler may be accessible after the printer has been shared. A restart of the service on the DC switch it to an unavailable state until the printer is browser on the DC (like in the explorer when browsing a computer and its printer)
- else the printer is not available