diff --git a/Scripts/list-print-jobs.ps1 b/Scripts/list-print-jobs.ps1 index 773956c3..d25d3178 100755 --- a/Scripts/list-print-jobs.ps1 +++ b/Scripts/list-print-jobs.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Lists all jobs of all printers + Lists all print jobs .DESCRIPTION This PowerShell script lists all print jobs of all printer devices. .EXAMPLE @@ -14,18 +14,22 @@ #Requires -Version 4 try { - $printers = Get-Printer - if ($printers.Count -eq 0) { throw "No printer found" } + if ($IsLinux) { + # TODO + } else { + $printers = Get-Printer + if ($printers.Count -eq 0) { throw "No printer found" } - "" - "Printer Jobs" - "------- ----" - foreach ($printer in $printers) { - $printjobs = Get-PrintJob -PrinterObject $printer - if ($printjobs.Count -eq 0) { - "$($printer.Name) none" - } else { - "$($printer.Name) $printjobs" + "" + "Printer Jobs" + "------- ----" + foreach ($printer in $printers) { + $printjobs = Get-PrintJob -PrinterObject $printer + if ($printjobs.Count -eq 0) { + "$($printer.Name) none" + } else { + "$($printer.Name) $printjobs" + } } } exit 0 # success