Changing the spooler directory
During the printing process, the Windows printer spooler in Windows uses an on-disk folder to hold the temporary files the printing process creates. If multiple users each print very large documents to a single printer, the print queue and the temporary folder 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.
Getting ready
This recipe uses the PSRV
printer server set up as per the Installing and sharing printers recipe.
How to do it...
- Loading the
System.Printing
namespace and classesAdd-Type -AssemblyName System.Printing
- Defining the required
permissions
$Permissions = [System.Printing.PrintSystemDesiredAccess]::AdministrateServer
- Creating a
PrintServer
object with...