Add-Printer
Adds a printer to the specified computer.
Parameter Set: connection
Add-Printer [-ConnectionName] <String> [-AsJob] [-CimSession <CimSession> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: port
Add-Printer [-Name] <String> [-DriverName] <String> -PortName <String> [-AsJob] [-CimSession <CimSession> ] [-Comment <String> ] [-ComputerName <String> ] [-Datatype <String> ] [-KeepPrintedJobs] [-Location <String> ] [-PermissionSDDL <String> ] [-PrintProcessor <String> ] [-Priority <UInt32> ] [-Published] [-RenderingMode <RenderingModeEnum> ] [-SeparatorPageFile <String> ] [-Shared] [-ShareName <String> ] [-StartTime <UInt32> ] [-ThrottleLimit <Int32> ] [-UntilTime <UInt32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: wsd
Add-Printer [-Name] <String> [-AsJob] [-CimSession <CimSession> ] [-Comment <String> ] [-ComputerName <String> ] [-Datatype <String> ] [-DeviceURL <String> ] [-DeviceUUID <String> ] [-KeepPrintedJobs] [-Location <String> ] [-PermissionSDDL <String> ] [-PrintProcessor <String> ] [-Priority <UInt32> ] [-Published] [-RenderingMode <RenderingModeEnum> ] [-SeparatorPageFile <String> ] [-Shared] [-ShareName <String> ] [-StartTime <UInt32> ] [-ThrottleLimit <Int32> ] [-UntilTime <UInt32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
The Add-Printer cmdlet adds a printer to a specified computer. You can add both local printers and connections to network-based printers.
You cannot use wildcard characters with Add-Printer. You can use Add-Printer in a Windows PowerShell remoting session.
You do not need administrator privileges to use Add-Printer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Runs 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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the text to add to the Comment field for the specified printer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the computer to which to add the printer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of a shared printer to which to connect. This parameter is required.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the data type the printer uses to record print jobs.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Adds a WSD (Web Services on Devices) printer to the specified computer. The URL is used for directed discovery.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the multicast UUID for device detection for the WSD port.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the printer driver for the printer.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies whether the print jobs in the queue are kept.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
False |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the location of the printer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the printer to add.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies the permissions for the printer as an SDDL (Security Descriptor Definition Language) string.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the port used or created for the printer.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the print processor used by the printer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the relative queue priority.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies whether or not the printer is published in the network directory service.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the rendering mode for the printer. You can specify one of the following three rendering modes: SSR (Service Side Rendering), CSR (Client Side Rendering), or Branch Office
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
0 |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the path to and name of the separator page to be used by the printer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name by which to share the printer on the network. To share a printer, specify the Shared parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Indicates whether to share the printer on the network. You can determine the name by which the printer is shared by specifying ShareName. If ShareName is not specified, the name of the printer is used as the share name.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the starting time of printer availability.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the ending time of printer availability.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
- This cmdlet takes no input objects.
The output type is the type of the objects that the cmdlet emits.
- This cmdlet produces no output.
-------------------------- ExampleXAMPLE 1: Add a printer to a local machinecomputer by specifying Driver name and Port name-------------------------- xample:Add a printer to a local computer
This command adds a printer with name "mxdw2" to the local computer. The "mxdw" printer uses the "Microsoft XPS Document Writer v4" driver and the "portprompt:" port.
The “portprompt:” port prompts for a file name to save the XPS document when printing to the XPS printer.
PS C:\> Add-Printer -Name "mxdw 2" -DriverName "Microsoft XPS Document Writer v4" -PortName "portprompt:"
-------------------------- ExampleXAMPLE 2: Add a new network printer connection-------------------------- xample:Add a new network printer connection
This command adds a new printer by specifying the name of a print server and a shared printer on that server.
PS C:\> Add-Printer -ConnectionName \\printServer\printerName