Changing the spool directory
During the printing process, the Windows printer spooler in Windows uses an on-disk folder to hold the temporary files that have been created. If multiple users each print large documents to a single printer, the print queue can get quite large. By default, this folder is
C:\Windows\System32\spool\PRINTERS. For a busy print server with multiple printers, you may wish to change the default spool folder.
This recipe uses the
PSRV printer server that was set up as per the Installing and sharing printers recipe.
How to do it...
- Load the
System.Printingnamespace and classes:
Add-Type -AssemblyName System.Printing
- Define the required permissions—that is, the ability to administrate the server:
$Permissions = [System.Printing.PrintSystemDesiredAccess]:: ...