Question: Does anyone know if there's a way to add an IP printer port via the Add-PrinterPort Powershell command? I was able to add a new printer to a Windows 2016 server that uses an IPP port via GUI, and when I do a "get-printerport | select \*" command, here is the info that is listed for the created port:

> 
> 
> ```
> Caption               : 
> Description           : Internet Port
> ElementName           : 
> InstanceID            : 
> CommunicationStatus   : 
> DetailedStatus        : 
> HealthState           : 
> InstallDate           : 
> Name                  : https://REDACTED:443/printer 
> OperatingStatus       : 
> OperationalStatus     : 
> PrimaryStatus         : 
> Status                : 
> StatusDescriptions    : 
> ComputerName          : 
> PortMonitor           : Internet Port 
> PSComputerName        : 
> CimClass              : ROOT/StandardCimv2:MSFT_PrinterPort 
> CimInstanceProperties : {Caption,Description, ElementName, InstanceID...} 
> CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties
> 
> ```
> 
> 

I didn't see any examples in the [MS Add-PrinterPort](https://learn.microsoft.com/en-us/powershell/module/printmanagement/add-printerport?view=win10-ps) doc that go over adding an IPP port, and my web searches have come up empty. Has anyone been able to figure this out?

Thanks!

Answer: 
Apparently, adding the printer port via `Add-PrinterPort` is not necessary for an IPP printer ([1](https://www.reddit.com/r/PowerShell/comments/lrogn5/adding_ippcups_printers_with_printmanagement/)). Thus, the port type is not implemented in the cmdlet. Adding the printer using the `Add-Printer` cmdlet will also create the required port.

```
Add-Printer -Name "Example-p123" -PortName "https://cups.example.com:631/printers/Example-p123" -DriverName "Example Driver Name"

```
Got this working with batch:

rundll32 printui.dll,PrintUIEntry /if /b "NAME OF PRINTER" /r "URL" /m "Microsoft Enterprise Cloud Print Class Driver"