Dear all,
I need your kindly help in order to create a report that contains the amount of print jobs per months per queue on a server that host 600 queues, for the moment I manage to setup printing logs on the event logs in order to get all jobs.
at this point this is what I have construct:
$Results = Get-WinEvent -FilterHashTable @{LogName="Microsoft-Windows-PrintService/Operational"; ID=307;} -ComputerName $Computer
ForEach($Result in $Results){
$ProperyData = [xml]$Result.ToXml()
$PrinterName = $ProperyData.Event.UserData.DocumentPrinted.Param5
$hItemDetails = New-Object -TypeName psobject -Property @{
MachineName = $ProperyData.Event.UserData.DocumentPrinted.Param4
PrinterName = $PrinterName
TimeCreated = $Result.TimeCreated
}
$aPrinterList += $hItemDetails
}
$file="C:\temp\PrintAudit.csv"
#Output results to CSV file
$aPrinterList | Export-Csv $file
$filc=gc $file
$filc.count
FOr the moment I anly got to know how many jobs for the hold server, now I need to get the amount per queue.
Thanks in advance for your help