October 8, 2013 at 12:24 pm
As of now I have this in my Execute Process task Command section to print a list of text files in a directory.
Get-ChildItem -path $Directory -recurse -include *.txt | ForEach-Object {Start-Process -FilePath $_.fullname -Verb Print -PassThru | %{sleep 5;$_} | kill }
I believe it goes to the locally configured printer.
How do I make these files print to a specific network printer.
Thanks
October 8, 2013 at 12:31 pm
You can print to a specified printer using the Output-Printer cmdlet e.g.
Get-Process | Output-Printer "IT Department Printer"
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
October 8, 2013 at 12:54 pm
Can I do something like this ?
Get-ChildItem -path $Directory -recurse -include *.txt | ForEach-Object {Start-Process -FilePath $_.fullname -Verb Print -PassThru | %{sleep 5;$_} | kill }
Get-Process | Output-Printer "\\Print1\ABC01"
where ABC01 is the name of the printer.
or
Get-ChildItem -path $Directory -recurse -include *.txt | ForEach-Object {Start-Process -FilePath $_.fullname -Verb Print -PassThru | %{sleep 5;$_} | kill }
Get-Process | Output-Printer "ipaddress"
October 9, 2013 at 2:14 am
I believe so, by what you have posted. If I were you I would test that the printing is working first then build it up.
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply