Identify printer usage statistics in a certain server?

EnterpriseArchitect 4,506 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?

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,566 questions
Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
629 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,681 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,279 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,861 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kev Kelly 175 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 $_
    }
    
    0 comments No comments