0

I need to print an HTML file to a remote printer queue.

I've had a read of this question: print automatically html file with powershell

which says to do this:

$ie = new-object -com "InternetExplorer.Application"
$ie.Navigate("c:\test.html")
while ( $ie.busy ) { Start-Sleep -second 3 }
$ie.ExecWB(6,2)
while ( $ie.busy ) { Start-Sleep -second 3 }
$ie.quit()

But this uses Internet Explorer, and that only allows you to print to the local printer. The printer is on a shared standard TCP port.

Thanks in advance.

EDIT: More Info:

I have been tasked with the creation about 2,000 new Print Queue's on W2K12 using Powershell v4, which I have working fine. But I'd now like to confirm the success of these queue's by sending a nicely formatted html test print to each of the many remote print servers from my central management server. Without having these 2,000 queue's mapped to my management server, how can I achieve this task, as the Out-Printer Cmdlet prints the sheet in its Raw html tag format and not its Marked up nice format.

Community
  • 1
  • 1
David Klempfner
  • 8,700
  • 20
  • 73
  • 153
  • Is the remote printer a shared printer? Or pure queue? IP address only? – Austin T French Mar 12 '14 at 03:05
  • Hi Austin, please see my edit. – David Klempfner Mar 12 '14 at 03:24
  • 5
    From memory, it's possible to create a local printer which prints to a remote port. E.g. In Win7, 'Devices & Printers' > 'Add a Printer' > 'Add a local printer' > 'Creat a new port' > 'Type of Port = Standard TCP/IP Port' > Next etc. Apps should see this as a 'local' printer. – andyb Mar 12 '14 at 04:35

0 Answers0