I am very new to scripting and having problems sending PDFs to selected printers
see script
$searchPath = "c:\autoprint\print"
$IncomingPdfs = Get-ChildItem $SearchPath
ForEach($NewPdf in $IncomingPdfs)
{
Start-Process –FilePath ($NewPdf).Fullname -Verb Print | Out-Printer "Canon MG3100 series Printer WS-2" | %{sleep 1;$_} | kill
Start-Process –FilePath ($NewPdf).Fullname -Verb Print | Out-Printer "Canon MG3100 series Printer WS" | %{sleep 1;$_} | kill
}
the prints are being sent to my default printer
any ideas ?
many thanks in advance