I am trying to get a PowerShell script to work to print out multiple documents to the default printer. Any ideas on what I can do to get this to work?
$files = Get-ChildItem -Filter "*.pdf"
foreach ($file in $files) {
"c:\Program Files (x86)\Foxit Software\Foxit Reader\FoxitReader.exe" /t $file
}
Use the parameter
/p
for printing to the default printer, use the call operator (&
) for executing command paths in quotes.Change this line:
into this: