Avatar of Rich Smith
Rich Smith
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Add IPP Printer using PowerShell?

Hi,
I am looking to deploy a printer that uses IPP via Intune using PowerShell, I have started testing the script on a local device before adding it to Intune.

Add-PrinterDriver -Name "HP PCL 6" 
Add-PrinterPort -Name "http://print.company.com:631/ipp/r/261141/46B4" -PrinterHostAddress "http://print.company.com:631/ipp/r/261141/46B4" -PortNumber 631
Add-Printer "http://print.company.com:631/ipp/r/261141/46B4" -DriverName "HP PCL 6" -PortName "http://print.company.com:631/ipp/r/261141/46B4"
 

Open in new window

This script adds the printer as a Standard TCP/IP Port 
When I add the printer manually the port type is ‘Internet Port’ is it possible to add an IPP printer via PowerShell?

PowershellWindows 10Printers and Scanners

Avatar of undefined
Last Comment
arnold

8/22/2022 - Mon
arnold

Rich Smith

ASKER
Hi,

No AD for these devices only Intune.
Thanks for the link but it does the same as my PowerShell script and adds as a TCP/IP Port and not an IPP port.

Thanks,
Rich
arnold

It might be semantic, but an IPP printer still uses TCP/IP to identify the host, and uses the driver/marker

I think you are using the OS included "HP PCL 6" is not an IPP type of connection, usually you need a PPD type of driver.

Try and use the following examle to see whether the definition of the printer while using..
https://stackoverflow.com/questions/64539382/adding-an-ipp-port-via-add-printerport-powershell-command

Alternatively, add the printer through the GUI if possible and compare the two.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Rich Smith

ASKER
Hi,
This is the output from get-printerport | select *


Caption               :
Description           : Internet Port
ElementName           :
InstanceID            :
CommunicationStatus   :
DetailedStatus        :
HealthState           :
InstallDate           :
Name                  : http://print.company.com:631/ipp/r/261141/46B4
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


-----------


Protocol              : RAW
Caption               :
Description           : Standard TCP/IP Port
ElementName           :
InstanceID            :
CommunicationStatus   :
DetailedStatus        :
HealthState           :
InstallDate           :
Name                  : http://print.company.com:631/ipp/r/261141/46B4
OperatingStatus       :
OperationalStatus     :
PrimaryStatus         :
Status                :
StatusDescriptions    :
ComputerName          :
PortMonitor           : TCPMON.DLL
LprByteCounting       : False
LprQueueName          :
PortNumber            : 9100
PrinterHostAddress    : http://print.company.com:631/ipp/r/261141/46B4
PrinterHostIP         :
SNMPCommunity         :
SNMPEnabled           : False
SNMPIndex             : 0
PSComputerName        :
CimClass              : ROOT/StandardCimv2:MSFT_TcpIpPrinterPort
CimInstanceProperties : {Caption, Description, ElementName, InstanceID...}
CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties

Open in new window




ASKER CERTIFIED SOLUTION
arnold

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question