Link to home
Start Free TrialLog in
Avatar of Rich Smith
Rich SmithFlag 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?

Avatar of arnold
arnold
Flag of United States of America image

Avatar of 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
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.
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
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial