CMDLETS
$Printer = Get-WmiObject win32_printer | where {$_.name -match "XPS"}
$Printer.SetDefaultPrinter()
"XPS" in the command can be replaced by your printer name , unique word which will exactly point your printer can be mentioned within the quotations
win32_Printer
This WMI class will hold all the printer information in your computer
SetDefaultPrinter()
This method inside Win32_Printer will set the selected printer as a default printer
No comments:
Post a Comment