Windows PowerShell command on Get-command Add-Printer
MyWebUniversity

Windows PowerShell command on Get-command Add-Printer

NAME

Add-Printer

SYNOPSIS

Adds a printer to the specified computer.

SYNTAX

Add-Printer [-Name] [-DriverName] [-BranchOfficeOfflineLogSizeMB ] [-CimSession

] [-Comment ] [-ComputerName ] [-Datatype ] [-DisableBranchOfficeLogging]

[-KeepPrintedJobs] [-Location ] [-PermissionSDDL ] [-PrintProcessor ] [-Priority ]

[-Published] [-RenderingMode {SSR | CSR | BranchOffice}] [-SeparatorPageFile ] [-Shared] [-ShareName

] [-StartTime ] [-ThrottleLimit ] [-UntilTime ] -PortName [-Confirm]

[-WhatIf] []

Add-Printer [-Name] [-BranchOfficeOfflineLogSizeMB ] [-CimSession ] [-Comment

] [-ComputerName ] [-Datatype ] [-DeviceURL ] [-DeviceUUID ]

[-DisableBranchOfficeLogging] [-KeepPrintedJobs] [-Location ] [-PermissionSDDL ] [-PrintProcessor

] [-Priority ] [-Published] [-RenderingMode {SSR | CSR | BranchOffice}] [-SeparatorPageFile

] [-Shared] [-ShareName ] [-StartTime ] [-ThrottleLimit ] [-UntilTime ]

[-Confirm] [-WhatIf] []

Add-Printer [-ConnectionName] [-CimSession ] [-ThrottleLimit ] [-Confirm] [-WhatIf]

[]

DESCRIPTION

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 administrative credentials to run Add-Printer.

PARAMETERS

-BranchOfficeOfflineLogSizeMB []

Specifies the maximum size, in megabytes, of the branch office remote offline log file for this printer. You cannot specify this parameter for unshared queues or queues that do not have branch office enabled. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-CimSession []

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. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Comment []

Specifies the text to add to the Comment field for the specified printer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-ComputerName []

Specifies the name of the computer to which to add the printer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-ConnectionName

Specifies the name of a shared printer to which to connect. This parameter is required. Required? true Position? 1 Default value none Accept pipeline input? false Accept wildcard characters? false

-Datatype []

Specifies the data type the printer uses to record print jobs. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-DeviceURL []

Specifies a URL for directed discovery of Web Services on Devices (WSD) printer to add to the specified computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-DeviceUUID []

Specifies the multicast UUID for device detection for the WSD port. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-DisableBranchOfficeLogging []

Indicates that branch office remote logging is disabled. You cannot specify this parameter for unshared queues. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-DriverName

Specifies the name of the printer driver for the printer. Required? true Position? 2 Default value none Accept pipeline input? false Accept wildcard characters? false

-KeepPrintedJobs []

Specifies whether the print jobs in the queue are kept. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Location []

Specifies the location of the printer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Name

Specifies the name of the printer to add. Required? true Position? 1 Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false

-PermissionSDDL []

Specifies the permissions for the printer as a Security Descriptor Definition Language (SDDL) string. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-PortName

Specifies the name of the port that is used or created for the printer. Required? true Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-PrintProcessor []

Specifies the name of the print processor used by the printer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Priority []

Specifies the relative queue priority. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Published []

Specifies whether the printer is published in the network directory service. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-RenderingMode []

Specifies the rendering mode for the printer. You can specify one of the following rendering modes:

-- SSR, Service Side Rendering

-- CSR. Client Side Rendering

-- BranchOffice. Branch Office

Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-SeparatorPageFile []

Specifies the path of and name of the separator page to be used by the printer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-ShareName []

Specifies the name by which to share the printer on the network. To share a printer, specify the Shared parameter. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Shared []

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. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-StartTime []

Specifies the starting time of printer availability. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-ThrottleLimit []

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 PowerShellr 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. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-UntilTime []

Specifies the ending time of printer availability. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Confirm []

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false

-WhatIf []

Shows what would happen if the cmdlet runs. The cmdlet is not run.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, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

This cmdlet takes no input objects.

OUTPUTS

This cmdlet produces no output.

Example 1: Add a printer to a local computer

PS C:\> Add-Printer -Name "mxdw 2" -DriverName "Microsoft XPS Document Writer v4" -PortName "portprompt:"

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.

Example 2: Add a new network printer connection

PS C:\> Add-Printer -ConnectionName \\printServer\printerName

This command adds a printer by specifying the name of a print server and a shared printer on that server.

RELATED LINKS

Get-Printer

Set-Printer

Remove-Printer

Rename-Printer



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™