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.