Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get the name of the default printer on my machine through the Windows command line?

share|improve this question

Microsoft Windows XP comes with a VBS script to manage local and network printers from the command line:

  • Get the default printer details from command line:

    cscript C:\windows\system32\prnmngr.vbs -g

  • Get the list of printers added to the system from Windows command line:

    cscript C:\windows\system32\prnmngr.vbs -l

  • Set default printer from windows command line:

    cscript C:\windows\system32\prnmngr.vbs -t -p "\Servername\printername"


Official documentation and more usage examples can be found at:

MS WinXP Product Documentation for the Prnmngr.vbs File

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .