Get-PrinterStatusList-Html
Print Management: HTML report of printer status list
#Requires -Version 5.1
#Requires -Modules PrintManagement
[CmdletBinding()]
Param([string]$ComputerName)
Process {
try {
if ([System.String]::IsNullOrWhiteSpace($ComputerName)) { $ComputerName = [System.Net.DNS]::GetHostByName('').HostName }
$result = Get-WinEvent -LogName "Microsoft-Windows-PrintService/Admin" -ComputerName $ComputerName -MaxEvents 50 -ErrorAction Stop | Select-Object TimeCreated, Id, LevelDisplayName, Message
Write-Output ($result | ConvertTo-Html -Fragment)
}
catch { throw }
}Computer to retrieve printer status from