Windows 8.1 or Server 2012 R2
Both Windows 8.1 and Server 2012 R2 come with a module called “PrintManagement”. It includes all cmdlets needed to manage local and remote printers.
To list all print jobs on a given computer, first determine the available printers, and then retrieve the print jobs for each printer in a loop. This is much simpler than it may seem:
$ComputerName = $env:COMPUTERNAME Get-Printer -ComputerName $ComputerName | ForEach-Object { Get-PrintJob -PrinterName $_.Name -ComputerName $ComputerName }
If the code returns nothing, then you know there are no print jobs (or you do not have permissions to read them).