In Windows 7, we can set default printer from control panel -> Devices and printers. For Windows geeks and system administrators, here’s a command line tip for doing the same with a simple wmic command. Read on…
First, let’s get the list of printers installed on the computer. You can run the below command for this list.
wmic printer get name,default
Example: the above command prints the following on my computer.
c:\>wmic printer get name,default Default Name FALSE Send To OneNote 2010 FALSE Eng_Printer_1stFloor FALSE HR_printer_2ndFloor TRUE HP_COLOR_PRINTER FALSE Microsoft XPS Document Writer FALSE Fax
As you can see it also tells us which one is the default printer. Now the syntax for setting a new default printer:
wmic printer where name='printername' call setdefaultprinter
The default printer on my computer is ‘HP_COLOR_PRINTER’. Now let’s change it to ‘Eng_Printer_1stFloor’. The command for this is given below.
wmic printer where name='Eng_Printer_1stFloor' call setdefaultprinter
This command also works on Server 2008. Though I have not verified it, it should work for other Windows editions also(XP, Vista, Server 2003).