Setting default printer in windows 8

broken image

If you are using the batch file as your login script, you can then simply put the following codes into your batch file. The following screenshot shows off how the command runs on the PowerShell console to set up a network mapped printer named “Corp-6” as default printer. Note that if you are defaulting a network mapped printer, use ShareName instead of Name in the command listed above.

broken image

$printer = Get-WmiObject -Query 'Select * From Win32_Printer Where Name = 'name of the printer'' Through that variable that has all the information about the printer, we can accomplish the mission through a simple SetDefaultPrinter() method. We will need to pick the printer we want to set to default, and pass it to a variable. The standard use of Get-WmiObject as follows:Īs we can see, simply running this cmdlet won’t helps us fulfill the mission.

broken image

We will be using Get-WmiObject cmdlet along with the Win32_Printer class to get the list of printers installed on the computer to start with. Choose the printer you want to be the default for Windows Programs. Please start the RUN-Dialog Keyboard Shortcut Windows-Logo + R 2. And fortunately, you can do so with the help of a couple of PowerShell commands. Set default printer on all windows Desktop and Server OS 1. In some cases, it would be nice that the default printer can be set to different printer automatically based on where and/or when you log into a computer in a network.