Network Implementation &
Support
Chapter 8
Implementing & Managing
Printers

Eric Vanderburg © 2006
Terms
•
•
•
•
•

Print Device
Printer
Print Driver
Print Server
Print Client

Eric Vanderburg © 2006
Printing Process
1. User prints from app
2. App contacts GDI (Graphical Device Interface)
3. GDI contacts print driver for printer info,
renders (combines printer info & document)
4. GDI sends rendered job to the print spooler
5. Client side spooler contacts server side
spooler
6. Server side spooler contacts print router

Eric Vanderburg © 2006
7.

Print router determines if the printer is local or remote.
a.
b.

Local: job forwarded to local print provider
Remote: finds remote print provider for that print server & that
print provider sends the data to the print server local print
provider

7.

Local print provider finds a print processor that can
process the print job
8. Print processor contacts GDI for further rendering (if
required)
9. Print processor sends job to separator processor
10. Job is sent to the port monitor which is connected to
the printer.

Eric Vanderburg © 2006
Concepts
• Changing spool directory
– Printers & Faxes
– File  Server Properties  Advanced tab
– Type a new location
– See pg. 321

Eric Vanderburg © 2006
Eric Vanderburg © 2006
Concepts
• Adding a printer (local / remote)
• Sharing a printer
– Print
– Manage Documents
– Manage Printers

•
•
•
•

Printer Pooling
Printer Priorities (per share, 99 is best)
Additional drivers for other OS’s
IPP (Internet Printing Protocol)
– Requires IIS (Internet Information Services)
– http://printserver/printers
Eric Vanderburg © 2006
Eric Vanderburg © 2006
Scripting
•

Prncnfg.vbs – printer configuration
– -g : Required. Specifies that you want to display configuration
information about a printer.
– -t : Required. Specifies that you want to configure a printer.
– -s RemoteComputer : Specifies, by name, the remote computer that
manages the printer about which you want to display information. If you
do not specify a computer, the local computer is used.
– -p PrinterName : Required. Specifies, by name, the printer about which
you want to display information.
– -u UserName -w Password : Specifies an account with permissions to
connect by using Windows Management Instrumentation (WMI) services
– -l Location : Specifies the printer location, such as "Copier Room."
– -m Comment : Specifies the comment string.
– -h ShareName : Specifies the share name.
– -f SeparatorText : Specifies a file that contains the text that appears on
the separator page.
– To keep spooled jobs after printing:  cscript prncnfg.vbs -t -s Root 
-p TheBeast +keepprintedjobs

Eric Vanderburg © 2006
Scripting
•
•
•
•
•
•

•
•
•

{+ | -}shared :
{+ | -}direct : Specifies whether the document should be sent directly to the
printer without being spooled.
{+ | -}published : 
{+ | -}rawonly : Specifies whether only raw data print jobs can be spooled
on this queue.
{+ | -}queued : Specifies that the printer should not begin to print until after
the last page of the document is spooled.
{+ | -}keepprintedjobs : Specifies whether the spooler should retain
documents after they are printed. Enabling this option allows a user to
resubmit a document to the printer from the print queue instead of from the
printing program.
{+ | -}workoffline : Specifies whether you should be able to send print jobs
to the print queue even if your computer is not connected to the network.
{+ | -}enabledevq : Specifies whether print jobs that do not match the
printer setup (for example, PostScript files spooled to non-PostScript
printers) should be held in the queue rather than being printed.
{+ | -}docompletefirst : {+ | -}enablebidi : Specifies whether the printer
sends status information to the spooler.

Eric Vanderburg © 2006
Scripting
• Prndrvr.vbs
– -a : Specifies that you want to install a driver.
– -d : Specifies that you want to delete a driver.
– -m DriverName : Specifies, by name, the driver you
want to install. Drivers are often named for the model
of printer they support. See the printer documentation
for more information.
– -v {0 | 1 | 2 | 3} : Specifies the version of the driver
you want to install. (0=9x, 1=NT3, 2=NT4, 3=2k/XP)
– -e Environment (x86, Alpha, R4000, PowerPC)
– cscript prndrvr.vbs -a -m "Color Printer Driver 1" 
-v 3 -e "Windows NT x86"
Eric Vanderburg © 2006
Scripting
• Prnport.vbs – change ports
– -a : Required. Specifies that you want to create a standard
TCP/IP printer port.
– -r PortName : Required. Specifies the port to which the printer is
connected.
– -s RemoteComputer : 
– -h IPAddress : Required. Specifies the IP address you want to
assign to the port.
– -u UserName -w Password : 
– -o {raw -n PortNumber | lpr} : Specifies which protocol the port
uses: TCP raw or TCP LPR. If you use TCP raw, specifies the
port number for a TCP raw printer port. (Default port is 9100)
– -q QueueName : Specifies the queue name for a TCP raw port.
– cscript prnport.vbs -t -r PortName -s Root -o raw -n 8521
-h 192.168.0.10 -q NtQueue -i Index1 -u evanderburg w OrangeJuice
– To list all printer ports:  cscript prnport.vbs -l -s Root

Eric Vanderburg © 2006
Scripting
• Prnmngr.vbs – set default printer, add printer connection
–
–
–
–

-a : Required. Specifies that you want to add a local printer.
-x : Required. Specifies that you want to delete all printers.  
-s RemoteComputer : 
-p PrinterName : Required. Specifies, by name, the local printer
that you want to add.
– -m DriverName : Required. Specifies, by name, the driver for
the local printer you want to add. Drivers are often named for the
model of printer they support. See the printer documentation for
more information.
– -r PortName : Required. Specifies the port to which the printer is
connected. If this is a parallel or a serial port, use the ID of the
port (for example, LPT1 or COM1). If this is a TCP/IP port, use
the port name that was specified when the port was added.
-u UserName -w Password :
– cscript prnmngr.vbs -x -s Root -p TheBeast -u evanderburg w OrangeJuice

Eric Vanderburg © 2006
Scripting
• Prnjobs.vbs – view, pause, cancel jobs
–
–
–
–
–
–
–
–

-z : Required. Specifies that you want to pause a print job.
-x : Required. Specifies that you want to cancel a print job.
-s RemoteComputer : 
-p PrinterName : Required. Specifies, by name, the printer that
would print the job you want to pause.
-j JobNumber : Required. Specifies, by ID number, the print job
you want to pause.
-u UserName -w Password 
cscript prnjobs -x -s Root -p TheBeast  -j JobNumber 
-u evanderburg -w OrangeJuice
List current print jobs:  cscript prnjobs.vbs -l -p Printer2

Eric Vanderburg © 2006
Scripting
• Prnqctl.vbs – pause, cancel, resume jobs, test
page print
– -x : Required. Specifies that you want to cancel all
jobs spooled to a printer.
– -z : Required. Specifies that you want to pause
printing.
– -s RemoteComputer : 
– -p PrinterName : Required. Specifies, by name, the
printer you want to pause.
– -u UserName -w Password :
– cscript prnqctl.vbs -x -s Root -p TheBeast
-u evanderburg -w OrangeJuice

• To run: cscript name.vbs parameters
Eric Vanderburg © 2006
Acronyms
• GDI, Graphics Device Interface
• IPP, Internet Printing Protocol
• WSH, Windows Scripting Host

Eric Vanderburg © 2006

Network Implementation and Support Lesson 08 Printers - Eric Vanderburg

  • 1.
    Network Implementation & Support Chapter8 Implementing & Managing Printers Eric Vanderburg © 2006
  • 2.
    Terms • • • • • Print Device Printer Print Driver PrintServer Print Client Eric Vanderburg © 2006
  • 3.
    Printing Process 1. Userprints from app 2. App contacts GDI (Graphical Device Interface) 3. GDI contacts print driver for printer info, renders (combines printer info & document) 4. GDI sends rendered job to the print spooler 5. Client side spooler contacts server side spooler 6. Server side spooler contacts print router Eric Vanderburg © 2006
  • 4.
    7. Print router determinesif the printer is local or remote. a. b. Local: job forwarded to local print provider Remote: finds remote print provider for that print server & that print provider sends the data to the print server local print provider 7. Local print provider finds a print processor that can process the print job 8. Print processor contacts GDI for further rendering (if required) 9. Print processor sends job to separator processor 10. Job is sent to the port monitor which is connected to the printer. Eric Vanderburg © 2006
  • 5.
    Concepts • Changing spooldirectory – Printers & Faxes – File  Server Properties  Advanced tab – Type a new location – See pg. 321 Eric Vanderburg © 2006
  • 6.
  • 7.
    Concepts • Adding aprinter (local / remote) • Sharing a printer – Print – Manage Documents – Manage Printers • • • • Printer Pooling Printer Priorities (per share, 99 is best) Additional drivers for other OS’s IPP (Internet Printing Protocol) – Requires IIS (Internet Information Services) – http://printserver/printers Eric Vanderburg © 2006
  • 8.
  • 9.
    Scripting • Prncnfg.vbs – printerconfiguration – -g : Required. Specifies that you want to display configuration information about a printer. – -t : Required. Specifies that you want to configure a printer. – -s RemoteComputer : Specifies, by name, the remote computer that manages the printer about which you want to display information. If you do not specify a computer, the local computer is used. – -p PrinterName : Required. Specifies, by name, the printer about which you want to display information. – -u UserName -w Password : Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services – -l Location : Specifies the printer location, such as "Copier Room." – -m Comment : Specifies the comment string. – -h ShareName : Specifies the share name. – -f SeparatorText : Specifies a file that contains the text that appears on the separator page. – To keep spooled jobs after printing:  cscript prncnfg.vbs -t -s Root  -p TheBeast +keepprintedjobs Eric Vanderburg © 2006
  • 10.
    Scripting • • • • • • • • • {+ | -}shared : {+ | -}direct : Specifies whether thedocument should be sent directly to the printer without being spooled. {+ | -}published :  {+ | -}rawonly : Specifies whether only raw data print jobs can be spooled on this queue. {+ | -}queued : Specifies that the printer should not begin to print until after the last page of the document is spooled. {+ | -}keepprintedjobs : Specifies whether the spooler should retain documents after they are printed. Enabling this option allows a user to resubmit a document to the printer from the print queue instead of from the printing program. {+ | -}workoffline : Specifies whether you should be able to send print jobs to the print queue even if your computer is not connected to the network. {+ | -}enabledevq : Specifies whether print jobs that do not match the printer setup (for example, PostScript files spooled to non-PostScript printers) should be held in the queue rather than being printed. {+ | -}docompletefirst : {+ | -}enablebidi : Specifies whether the printer sends status information to the spooler. Eric Vanderburg © 2006
  • 11.
    Scripting • Prndrvr.vbs – -a : Specifiesthat you want to install a driver. – -d : Specifies that you want to delete a driver. – -m DriverName : Specifies, by name, the driver you want to install. Drivers are often named for the model of printer they support. See the printer documentation for more information. – -v {0 | 1 | 2 | 3} : Specifies the version of the driver you want to install. (0=9x, 1=NT3, 2=NT4, 3=2k/XP) – -e Environment (x86, Alpha, R4000, PowerPC) – cscript prndrvr.vbs -a -m "Color Printer Driver 1"  -v 3 -e "Windows NT x86" Eric Vanderburg © 2006
  • 12.
    Scripting • Prnport.vbs –change ports – -a : Required. Specifies that you want to create a standard TCP/IP printer port. – -r PortName : Required. Specifies the port to which the printer is connected. – -s RemoteComputer :  – -h IPAddress : Required. Specifies the IP address you want to assign to the port. – -u UserName -w Password :  – -o {raw -n PortNumber | lpr} : Specifies which protocol the port uses: TCP raw or TCP LPR. If you use TCP raw, specifies the port number for a TCP raw printer port. (Default port is 9100) – -q QueueName : Specifies the queue name for a TCP raw port. – cscript prnport.vbs -t -r PortName -s Root -o raw -n 8521 -h 192.168.0.10 -q NtQueue -i Index1 -u evanderburg w OrangeJuice – To list all printer ports:  cscript prnport.vbs -l -s Root Eric Vanderburg © 2006
  • 13.
    Scripting • Prnmngr.vbs –set default printer, add printer connection – – – – -a : Required. Specifies that you want to add a local printer. -x : Required. Specifies that you want to delete all printers.   -s RemoteComputer :  -p PrinterName : Required. Specifies, by name, the local printer that you want to add. – -m DriverName : Required. Specifies, by name, the driver for the local printer you want to add. Drivers are often named for the model of printer they support. See the printer documentation for more information. – -r PortName : Required. Specifies the port to which the printer is connected. If this is a parallel or a serial port, use the ID of the port (for example, LPT1 or COM1). If this is a TCP/IP port, use the port name that was specified when the port was added. -u UserName -w Password : – cscript prnmngr.vbs -x -s Root -p TheBeast -u evanderburg w OrangeJuice Eric Vanderburg © 2006
  • 14.
    Scripting • Prnjobs.vbs –view, pause, cancel jobs – – – – – – – – -z : Required. Specifies that you want to pause a print job. -x : Required. Specifies that you want to cancel a print job. -s RemoteComputer :  -p PrinterName : Required. Specifies, by name, the printer that would print the job you want to pause. -j JobNumber : Required. Specifies, by ID number, the print job you want to pause. -u UserName -w Password  cscript prnjobs -x -s Root -p TheBeast  -j JobNumber  -u evanderburg -w OrangeJuice List current print jobs:  cscript prnjobs.vbs -l -p Printer2 Eric Vanderburg © 2006
  • 15.
    Scripting • Prnqctl.vbs –pause, cancel, resume jobs, test page print – -x : Required. Specifies that you want to cancel all jobs spooled to a printer. – -z : Required. Specifies that you want to pause printing. – -s RemoteComputer :  – -p PrinterName : Required. Specifies, by name, the printer you want to pause. – -u UserName -w Password : – cscript prnqctl.vbs -x -s Root -p TheBeast -u evanderburg -w OrangeJuice • To run: cscript name.vbs parameters Eric Vanderburg © 2006
  • 16.
    Acronyms • GDI, GraphicsDevice Interface • IPP, Internet Printing Protocol • WSH, Windows Scripting Host Eric Vanderburg © 2006