mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-17 02:01:01 +01:00
Update list-print-jobs.ps1
This commit is contained in:
parent
04b7ac59dc
commit
3308c4577f
@ -15,11 +15,17 @@
|
||||
try {
|
||||
$printers = Get-Printer
|
||||
if ($printers.Count -eq 0) { throw "No printer found" }
|
||||
|
||||
|
||||
""
|
||||
"Printer Jobs"
|
||||
"------- ----"
|
||||
foreach ($printer in $printers) {
|
||||
$printjobs = Get-PrintJob -PrinterObject $printer
|
||||
"$printer"
|
||||
"$printjobs"
|
||||
if ($printjobs.Count -eq 0) {
|
||||
"$($printer.Name) none"
|
||||
} else {
|
||||
"$($printer.Name) $printjobs"
|
||||
}
|
||||
}
|
||||
exit 0
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user