PowerShell Logo Small

Rename-Printer



This is the built-in help made by Microsoft for the command 'Rename-Printer', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Renames the specified printer.

SYNTAX


Rename-Printer [-Name] <String> [-NewName] <String> [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Rename-Printer [-InputObject] <CimInstance> [-NewName] <String> [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters
>]



Search powershellhelp.space

DESCRIPTION


The Rename-Printer cmdlet renames the specified printer on a computer. You can specify the printer to rename by using either a printer object retrieved by Get-Printer
, or by specifying a printer name.


You cannot use wildcard characters with Rename-Printer. You can use Rename-Printer in a Windows PowerShell remoting session.


You need administrator privileges to use Rename-Printer.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=289475
Add-Printer
Remove-Printer
Get-Printer
Set-Printer

REMARKS

<

Examples


Example 1: Rename a printer

PS C:\> Rename-Printer –Name "Microsoft XPS Document Writer" –NewName "MXDW"



This command renames the "Microsoft XPS Document Writer" printer name as "MXDW".




Example 2: Rename a printer by using a printer object

PS C:\>$Printer = Get-Printer –Name “Microsoft XPS Document Writer"


PS C:\>Rename-Printer -InputObject $Printer –NewName "MXDW"



This set of commands retrieves a printer object into a variable ($Printer) using Get-Printer, and then passes the contents of the variable to Rename-Printer.