Skip to content

Commit 93275a2

Browse files
authored
Merge pull request MicrosoftDocs#2667 from IngridAtMicrosoft/printmanagement
PrintManagement Cmdlet Update
2 parents d6a5a84 + 8db2c8b commit 93275a2

23 files changed

+323
-213
lines changed

docset/winserver2022-ps/printmanagement/Add-Printer.md

Lines changed: 109 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: MSFT_Printer_v1.0.cdxml-help.xml
44
Module Name: PrintManagement
5-
ms.date: 12/20/2016
5+
ms.date: 9/20/2021
66
online version: https://docs.microsoft.com/powershell/module/printmanagement/add-printer?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Add-Printer
@@ -21,14 +21,15 @@ Add-Printer [-ConnectionName] <String> [-CimSession <CimSession[]>] [-ThrottleLi
2121
[-Confirm] [<CommonParameters>]
2222
```
2323

24-
### wsd
24+
### ap
2525
```
2626
Add-Printer [-Comment <String>] [-Datatype <String>] [-UntilTime <UInt32>] [-KeepPrintedJobs]
2727
[-Location <String>] [-SeparatorPageFile <String>] [-ComputerName <String>] [-Shared] [-ShareName <String>]
2828
[-StartTime <UInt32>] [-Name] <String> [-PermissionSDDL <String>] [-PrintProcessor <String>]
2929
[-Priority <UInt32>] [-Published] [-RenderingMode <RenderingModeEnum>] [-DisableBranchOfficeLogging]
30-
[-BranchOfficeOfflineLogSizeMB <UInt32>] [-DeviceURL <String>] [-DeviceUUID <String>]
31-
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>]
30+
[-BranchOfficeOfflineLogSizeMB <UInt32>] [-WorkflowPolicy <WorkflowPolicyEnum>] [-DeviceURL <String>]
31+
[-DeviceUUID <String>] [-IppURL <String>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob]
32+
[-WhatIf] [-Confirm] [<CommonParameters>]
3233
```
3334

3435
### port
@@ -38,7 +39,8 @@ Add-Printer [-Comment <String>] [-Datatype <String>] [-DriverName] <String> [-Un
3839
[-ShareName <String>] [-StartTime <UInt32>] [-Name] <String> [-PermissionSDDL <String>]
3940
[-PrintProcessor <String>] [-Priority <UInt32>] [-Published] [-RenderingMode <RenderingModeEnum>]
4041
-PortName <String> [-DisableBranchOfficeLogging] [-BranchOfficeOfflineLogSizeMB <UInt32>]
41-
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>]
42+
[-WorkflowPolicy <WorkflowPolicyEnum>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob]
43+
[-WhatIf] [-Confirm] [<CommonParameters>]
4244
```
4345

4446
## DESCRIPTION
@@ -54,7 +56,7 @@ You may need administrative credentials to run **Add-Printer**.
5456

5557
### Example 1: Add a printer to a local computer
5658
```powershell
57-
PS C:\> Add-Printer -Name "mxdw 2" -DriverName "Microsoft XPS Document Writer v4" -PortName "portprompt:"
59+
Add-Printer -Name "mxdw 2" -DriverName "Microsoft XPS Document Writer v4" -PortName "portprompt:"
5860
```
5961

6062
This command adds a printer with name mxdw2 to the local computer.
@@ -64,7 +66,7 @@ The` portprompt:` port prompts for a file name to save the XPS document when pri
6466

6567
### Example 2: Add a new network printer connection
6668
```powershell
67-
PS C:\> Add-Printer -ConnectionName \\printServer\printerName
69+
Add-Printer -ConnectionName \\printServer\printerName
6870
```
6971

7072
This command adds a printer by specifying the name of a print server and a shared printer on that server.
@@ -92,8 +94,8 @@ You cannot specify this parameter for unshared queues or queues that do not have
9294
9395
```yaml
9496
Type: UInt32
95-
Parameter Sets: wsd, port
96-
Aliases:
97+
Parameter Sets: ap, port
98+
Aliases:
9799

98100
Required: False
99101
Position: Named
@@ -124,8 +126,8 @@ Specifies the text to add to the Comment field for the specified printer.
124126
125127
```yaml
126128
Type: String
127-
Parameter Sets: wsd, port
128-
Aliases:
129+
Parameter Sets: ap, port
130+
Aliases:
129131

130132
Required: False
131133
Position: Named
@@ -139,7 +141,7 @@ Specifies the name of the computer to which to add the printer.
139141
140142
```yaml
141143
Type: String
142-
Parameter Sets: wsd, port
144+
Parameter Sets: ap, port
143145
Aliases: CN
144146

145147
Required: False
@@ -185,8 +187,8 @@ Specifies the data type the printer uses to record print jobs.
185187
186188
```yaml
187189
Type: String
188-
Parameter Sets: wsd, port
189-
Aliases:
190+
Parameter Sets: ap, port
191+
Aliases:
190192

191193
Required: False
192194
Position: Named
@@ -200,8 +202,8 @@ Specifies a URL for the directed discovery of a Web Services on Devices (WSD) pr
200202
201203
```yaml
202204
Type: String
203-
Parameter Sets: wsd
204-
Aliases:
205+
Parameter Sets: ap
206+
Aliases:
205207

206208
Required: False
207209
Position: Named
@@ -215,8 +217,8 @@ Specifies the multicast UUID for device detection for the WSD port.
215217
216218
```yaml
217219
Type: String
218-
Parameter Sets: wsd
219-
Aliases:
220+
Parameter Sets: ap
221+
Aliases:
220222

221223
Required: False
222224
Position: Named
@@ -231,8 +233,8 @@ You cannot specify this parameter for unshared queues.
231233
232234
```yaml
233235
Type: SwitchParameter
234-
Parameter Sets: wsd, port
235-
Aliases:
236+
Parameter Sets: ap, port
237+
Aliases:
236238

237239
Required: False
238240
Position: Named
@@ -256,13 +258,28 @@ Accept pipeline input: False
256258
Accept wildcard characters: False
257259
```
258260
261+
### -IppURL
262+
Specifies a URL or hostname or IP address for the directed discovery of an IPP (Internet Printing Protocol) printer to add to the specified computer.
263+
264+
```yaml
265+
Type: String
266+
Parameter Sets: ap
267+
Aliases:
268+
269+
Required: False
270+
Position: Named
271+
Default value: None
272+
Accept pipeline input: False
273+
Accept wildcard characters: False
274+
```
275+
259276
### -KeepPrintedJobs
260277
Specifies whether the print jobs in the queue are kept.
261278
262279
```yaml
263280
Type: SwitchParameter
264-
Parameter Sets: wsd, port
265-
Aliases:
281+
Parameter Sets: ap, port
282+
Aliases:
266283

267284
Required: False
268285
Position: Named
@@ -276,8 +293,8 @@ Specifies the location of the printer.
276293
277294
```yaml
278295
Type: String
279-
Parameter Sets: wsd, port
280-
Aliases:
296+
Parameter Sets: ap, port
297+
Aliases:
281298

282299
Required: False
283300
Position: Named
@@ -291,8 +308,8 @@ Specifies the name of the printer to add.
291308
292309
```yaml
293310
Type: String
294-
Parameter Sets: wsd, port
295-
Aliases:
311+
Parameter Sets: ap, port
312+
Aliases:
296313

297314
Required: True
298315
Position: 0
@@ -306,8 +323,8 @@ Specifies the permissions for the printer as a Security Descriptor Definition La
306323
307324
```yaml
308325
Type: String
309-
Parameter Sets: wsd, port
310-
Aliases:
326+
Parameter Sets: ap, port
327+
Aliases:
311328

312329
Required: False
313330
Position: Named
@@ -336,8 +353,8 @@ Specifies the name of the print processor used by the printer.
336353
337354
```yaml
338355
Type: String
339-
Parameter Sets: wsd, port
340-
Aliases:
356+
Parameter Sets: ap, port
357+
Aliases:
341358

342359
Required: False
343360
Position: Named
@@ -351,8 +368,8 @@ Specifies the relative queue priority.
351368
352369
```yaml
353370
Type: UInt32
354-
Parameter Sets: wsd, port
355-
Aliases:
371+
Parameter Sets: ap, port
372+
Aliases:
356373

357374
Required: False
358375
Position: Named
@@ -366,8 +383,8 @@ Specifies whether the printer is published in the network directory service.
366383
367384
```yaml
368385
Type: SwitchParameter
369-
Parameter Sets: wsd, port
370-
Aliases:
386+
Parameter Sets: ap, port
387+
Aliases:
371388

372389
Required: False
373390
Position: Named
@@ -388,8 +405,8 @@ Branch Office
388405
389406
```yaml
390407
Type: RenderingModeEnum
391-
Parameter Sets: wsd, port
392-
Aliases:
408+
Parameter Sets: ap, port
409+
Aliases:
393410
Accepted values: SSR, CSR, BranchOffice
394411

395412
Required: False
@@ -404,8 +421,8 @@ Specifies the path of and name of the separator page to be used by the printer.
404421
405422
```yaml
406423
Type: String
407-
Parameter Sets: wsd, port
408-
Aliases:
424+
Parameter Sets: ap, port
425+
Aliases:
409426

410427
Required: False
411428
Position: Named
@@ -414,14 +431,15 @@ Accept pipeline input: False
414431
Accept wildcard characters: False
415432
```
416433
417-
### -ShareName
418-
Specifies the name by which to share the printer on the network.
419-
To share a printer, specify the **Shared** parameter.
434+
### -Shared
435+
Indicates whether to share the printer on the network.
436+
You can determine the name by which the printer is shared by specifying **ShareName**.
437+
If **ShareName** is not specified, the name of the printer is used as the share name.
420438
421439
```yaml
422-
Type: String
423-
Parameter Sets: wsd, port
424-
Aliases:
440+
Type: SwitchParameter
441+
Parameter Sets: ap, port
442+
Aliases:
425443

426444
Required: False
427445
Position: Named
@@ -430,15 +448,14 @@ Accept pipeline input: False
430448
Accept wildcard characters: False
431449
```
432450
433-
### -Shared
434-
Indicates whether to share the printer on the network.
435-
You can determine the name by which the printer is shared by specifying **ShareName**.
436-
If **ShareName** is not specified, the name of the printer is used as the share name.
451+
### -ShareName
452+
Specifies the name by which to share the printer on the network.
453+
To share a printer, specify the **Shared** parameter.
437454
438455
```yaml
439-
Type: SwitchParameter
440-
Parameter Sets: wsd, port
441-
Aliases:
456+
Type: String
457+
Parameter Sets: ap, port
458+
Aliases:
442459

443460
Required: False
444461
Position: Named
@@ -452,8 +469,8 @@ Specifies the starting time of printer availability.
452469
453470
```yaml
454471
Type: UInt32
455-
Parameter Sets: wsd, port
456-
Aliases:
472+
Parameter Sets: ap, port
473+
Aliases:
457474

458475
Required: False
459476
Position: Named
@@ -484,8 +501,25 @@ Specifies the ending time of printer availability.
484501

485502
```yaml
486503
Type: UInt32
487-
Parameter Sets: wsd, port
488-
Aliases:
504+
Parameter Sets: ap, port
505+
Aliases:
506+
507+
Required: False
508+
Position: Named
509+
Default value: None
510+
Accept pipeline input: False
511+
Accept wildcard characters: False
512+
```
513+
514+
### -WorkflowPolicy
515+
Enables an administrator to associate a given printer with a specific Workflow application. This parameter does not allow the administrator to override the device-app association that was made using the device metadata service.
516+
517+
518+
```yaml
519+
Type: WorkflowPolicyEnum
520+
Parameter Sets: ap, port
521+
Aliases:
522+
Accepted values: Uninitialized, Disabled, Enabled
489523
490524
Required: False
491525
Position: Named
@@ -494,6 +528,21 @@ Accept pipeline input: False
494528
Accept wildcard characters: False
495529
```
496530

531+
### -Confirm
532+
Prompts you for confirmation before running the cmdlet.
533+
534+
```yaml
535+
Type: SwitchParameter
536+
Parameter Sets: (All)
537+
Aliases: cf
538+
539+
Required: False
540+
Position: Named
541+
Default value: False
542+
Accept pipeline input: False
543+
Accept wildcard characters: False
544+
```
545+
497546
### -WhatIf
498547
Shows what would happen if the cmdlet runs.
499548
The cmdlet is not run.
@@ -511,19 +560,19 @@ Accept wildcard characters: False
511560
```
512561

513562
### CommonParameters
514-
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
563+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
515564

516565
## INPUTS
517566

518-
### None
567+
### System.String
519568

520569
## OUTPUTS
521570

522-
### None
523-
571+
### System.Object
524572
## NOTES
525573

526-
- The WhatIf switch doesn’t work if the **ConnectionName** parameter set is used.
574+
- The WhatIf switch doesn't work if the **ConnectionName** parameter set is used.
575+
527576
## RELATED LINKS
528577

529578
[Get-Printer](./Get-Printer.md)

0 commit comments

Comments
 (0)