This works:
Add-Printer -IppURL http://printer-hostname:631/ipp/print
Anyone find out how to do it via win32 API?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. The following Powershell command works when Windows protected print mode is disabled, but the question is, how can I install a printer queue with Windows protected print mode enabled (using the Win32 API or Powershell)?
Add-Printer -Name "My Printer Name"
-PortName "http://printer-hostname:631/ipp/print"
-DriverName "Microsoft IPP Class Driver"
This works:
Add-Printer -IppURL http://printer-hostname:631/ipp/print
Anyone find out how to do it via win32 API?
Have you tried using printui.exe for this? Printui /? Will give you additional parameters. The printer must be turned on and Mopria compliant in order to be added when WPP is enabled. If that endpoint is not hardware, then you can't use printui or PowerShell
Hello,
You can find this in document: https://learn.microsoft.com/en-us/windows-hardware/drivers/print/windows-protected-print-mode#windows-protected-print-mode-device-compatibility
upon enabling Windows protected print mode, printers that use third–party drivers are uninstalled.
The print driver is deleted from the print driver store, and it can't be used while Windows protected print mode is active.
If the Answer is helpful, please click "Accept Answer" and upvote it.