Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Printing from powershell Expand / Collapse
Author
Message
Posted Friday, November 8, 2013 7:32 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, March 26, 2014 5:09 PM
Points: 178, Visits: 579
Get-ChildItem -path $Directory -recurse -include *.html | ForEach-Object {Start-Process -FilePath $_.fullname -Verb Print -PassThru | %{sleep 5;$_} | kill }

How do I suppress the print dialog ? I need to print a list of 200+ .html files. But the above code keeps prompting before printing each file ?
Post #1512878
Posted Saturday, November 9, 2013 2:19 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:31 AM
Points: 5,825, Visits: 3,743
Have you tried the Output-Printer command? I believe that this prints to the default printer using the default settings unless specified otherwise.

Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
Post #1512891
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse