Identify printer usage statistics in a certain server?

EnterpriseArchitect 6,041 Reputation points
2023-07-18T08:39:40.72+00:00

As part of the due diligence process, I need evidence or a way of identifying printer usage without causing a massive outage.

I can see some network printers shared and available when I browse some of the servers in my domain using \Server1. 

Is it possible to determine whether a printer has been shared from a server but it is still in use?

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | Print jobs
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | Devices and deployment | Configure application groups
{count} votes

1 answer

Sort by: Most helpful
  1. Kev Kelly 190 Reputation points
    2023-07-18T13:32:21.5833333+00:00

    Event ID 307 displays information about the jobs printed.

    The following PowerShell should get you started (although note I'm not in front of my environment to test) with being able to query those events, and return the printer names:

    $printLog = Get-WinEvent -FilterHashTable @{LogName='Microsoft-Windows-PrintService/Operational'; ID=307;}
    
    $printers = $printLog | ForEach-Object {
        $propertyData = [xml]$_.ToXml()
        $printerName = $propertyData.Event.UserData.DocumentPrinted.Param5
        $printerName
    } | Select-Object -Unique
    
    Write-Host "Printers Used:"
    $printers | ForEach-Object {
        Write-Host $_
    }
    
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.