Remove a printer from a computer.
Syntax
Remove-Printer [-Name] String[] [-ComputerName String]
[-CimSession CimSession[]] [-ThrottleLimit Int32]
[-AsJob] [-PassThru] [-WhatIf]
[-Confirm] [CommonParameters]
Remove-Printer -InputObject CimInstance[]
[-CimSession CimSession[]] [-ThrottleLimit Int32]
[-AsJob] [-PassThru] [-WhatIf]
[-Confirm] [CommonParameters]
Key
-Name
The name of the printer to be removed.
-AsJob
Run the cmdlet as a background job.
Use this parameter to run commands that take a long time to complete.
-CimSession
Run the cmdlet in a remote session or on a remote computer. Enter a computer name or
a session object, such as the output of a New-CimSession or Get-CimSession cmdlet.
The default is the current session on the local computer.
-ComputerName
The name of the computer from which to remove the printer.
-InputObject
Specifies the input object that is used in a pipeline command.
-PassThru
Return an object representing the item with which you are working.
By default, this cmdlet does not generate any output.
-WhatIf
Describe what would happen if you executed the command without
actually executing the command.
-Confirm
Prompt for confirmation before executing the command.
Standard Aliases for Remove-Printer: none
The Remove-Printer cmdlet deletes a printer from the specified computer. You can specify the printer to remove by using either a printer object retrieved by Get-Printer, or by specifying a printer name. You can use wildcard characters with Remove-Printer. You can use Remove-Printer in a Windows PowerShell remoting session. You do not need administrator credentials to run Remove-Printer.
Remove a specific printer:
PS C:\> Remove-Printer -Name "Microsoft XPS Document Writer"
Remove a specific printer using a printer object:
PS C:\> $PR1 = Get-Printer -Name "Microsoft XPS Document Writer"
PS C:\> Remove-Printer -InputObject $PR1
Remove Default Fax Printer:
PS C:\> Remove-Printer -Name "Fax"
“Used, Refilled, or Counterfeit ink cartridge Detected” ~ HP Printer status message.
Add-Printer - Add a printer to the specified computer.
Get-Printer - Retrieve a list of printers installed on a computer.
Set-Printer - Update the configuration of an existing printer.
Get-PrintJob - Retrieve a list of print jobs from the specified printer.