PRNMNGR.vbs – Windows CMD Command

Add, delete and list printers and printer connections, can also display or set the default printer.

Syntax
      cscript PRNMNGR.vbs [-options] [-s server][-p printer_name][-m driver model]
                  [-r port][-u user_name][-w password]

Options
   -l   list printers

   -a   add local printer
   -ac  add printer connection

   -g   get the default printer
   -t   set the default printer
   -d   delete printer
   -x   delete all printers
Examples

  Set _scripts=cscript %Windir%\System32\Printing_Admin_Scripts\en-US

  :: add printer
  %_scripts%\prnmngr.vbs -a -p "printer" -m "driver" -r "lpt1:"
  :: delete printer
  %_scripts%\prnmngr.vbs -d -p "printer" -s server

  :: connect to printer
  %_scripts%\prnmngr.vbs -ac -p "\\server\printer"
  :: delete connection
  %_scripts%\prnmngr.vbs -d -p "\\server\printer"

  :: delete all printers
  %_scripts%\prnmngr.vbs -x -s server
  :: List all printers
  %_scripts%\prnmngr.vbs -l -s server

  :: List a specific printer
  %_scripts%\prnmngr.vbs -l |find "Printer name"

  :: get the DEFAULT printer
  %_scripts%\prnmngr.vbs -g
  :: Set the DEFAULT printer
  %_scripts%\prnmngr.vbs -t -p "\\server\printer"

Prnmngr.vbs is not be included in the Windows PATH but will be found at %Windir%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs
If installed via the 2003 adminpack, it will be located in the \Program files\Windows Resource Kits\ folder.

You may also like...

1 Response

  1. frolep rotrem says:

    I love foregathering useful information , this post has got me even more info! .

Leave a Reply to frolep rotrem Cancel reply

Your email address will not be published. Required fields are marked *