0

I'd like to start off by stating that I'm new here so let me know if I frame my questions incorrectly or if I need to provide more information.

So, I'm trying to create a PowerShell script that will essentially install an IPP printer and adjust the settings.

I've been able to get the printer installed using

Add-Printer -Name \\http://printer.printer.com:2010\printer -DriverName "HP Universal Printing PCL 6" -PortName http://printer.printer.com:2010

But I'm running into a problem trying to adjust the following settings highlighted in yellow on the images via powershell.

bidirectional Form to tray assignment

With bidirectional, I tried:

Set-PrinterProperty -PrinterName "\\http://printer.printer.com:2010\printer" -"enablebidi"

And I get prompted for a value. I've entered false and $false but get the error

Set-PrinterProperty : The specified property was not found.

As for the second image's settings, I'm not even sure where to begin to adjust those using PowerShell. Any guidance would be greatly appreciated. Also, it doesn't have to be PowerShell if you know of an easier way to script this maybe a batch file etc.

machi_00
  • 1
  • 1
  • `Set-PrinterProperty` takes the property name and value as two separate parameters. Try `Set-PrinterProperty -PrinterName "\\http://printer.printer.com:2010\printer" -PropertyName "enablebidi" -Value "false"`. You might try `Get-PrinterProperty -PrinterName "\\http://printer.printer.com:2010\printer"` to determine the other properties. – Lance U. Matthews May 11 '20 at 21:32
  • Thanks for the quick response! I tried as you suggested and got the same specified property was not found error. One thing I forgot to mention is that I got the enablebidi from another stackoverflow thread https://stackoverflow.com/questions/48992474/disable-bidirectional-communication-for-a-printer Set-printerproperty didn't actually show anything for bidirectional or the form to tray assignment. – machi_00 May 11 '20 at 21:45
  • Just found a roundabout way to disable the bidirectional cscript //nologo C:\Windows\System32\Printing_Admin_Scripts\en-US\prncnfg.vbs -t -p "printername" -enablebidi Now I just need the form to tray assignment. – machi_00 May 11 '20 at 21:56
  • Then I think, as the error suggests, there is no such property. This works for me if I substitute my printer name: `$printer = Get-WmiObject -Class 'Win32_Printer' -Filter 'Name = ''\\http://printer.printer.com:2010\printer'''; $printer.EnableBIDI = $false; $printer.PSBase.Put()`. Take a look at the [`Win32_Printer` WMI class](https://learn.microsoft.com/windows/win32/cimwin32prov/win32-printer) for more properties. – Lance U. Matthews May 11 '20 at 22:02
  • Thanks, BACON. I'm reading it now! – machi_00 May 11 '20 at 22:06
  • How did you create the ipp printer port? – js2010 Oct 26 '20 at 14:21

0 Answers0