$folderPath = "C:\path\to\folder"
$printCopies = 3
Get-ChildItem -Path $folderPath -Filter *.doc | ForEach-Object {
for ($i = 0; $i -lt $printCopies; $i++) {
Start-Process -FilePath $_.FullName -Verb Print
}
}
# 一定要指定默认打印机
标签:printCopies,打印文件,doc,Start,Print,folderPath,powershell
From: https://blog.51cto.com/first01/6523715