在PowerShell中使用Foxit打印



我正在尝试让PowerShell脚本将多个文档打印到默认打印机。关于我能做些什么来让它工作的任何想法?

$files = Get-ChildItem -Filter "*.pdf"
foreach ($file in $files) {
"c:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /t $file
}

使用参数/p打印到默认打印机,使用调用运算符 (&( 执行引号中的命令路径。

更改此行:

"c:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /t $file

进入这个:

& "c:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /p $file

最新更新