Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Simplifying Printer Management in Windows with PrintUI

Managing Printers with PrintUI in Windows: A Guide to PowerShell and Batch Scripting


Printer management is an essential task for system administrators and IT professionals in any Windows environment. It involves installing, configuring, and managing printers across multiple machines. The PrintUI tool, available in Windows, provides a command-line interface for performing various printer-related tasks. This article aims to guide readers on how to use PowerShell and batch scripting with PrintUI to effectively manage printers in a Windows environment.


Examples:


1. Installing a Printer:
To install a printer using PrintUI in PowerShell, use the following command:


   Add-Printer -ConnectionName "\\printserver\printer"

In batch scripting, the command would be:


   rundll32 printui.dll,PrintUIEntry /ga /c\\printserver /n\\printserver\printer

2. Setting Default Printer:
PowerShell:


   (Get-WmiObject -Query "SELECT * FROM Win32_Printer WHERE Name LIKE 'PrinterName'").SetDefaultPrinter()

Batch Scripting:


   rundll32 printui.dll,PrintUIEntry /y /n "PrinterName"

3. Deleting a Printer:
PowerShell:


   Remove-Printer -Name "PrinterName"

Batch Scripting:


   rundll32 printui.dll,PrintUIEntry /dl /n "PrinterName"

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.