Out-Printer errors to variable

I’m trying to script sending output to a printer, and the command is outputting unusually formatted errors (not PS errors). When I run this:
“Test document.” | Out-Printer -Name “\print\printer”

I get this:
321s191ms678us ERROR: IoChannel::GetNetworkAddress() failed calling OpenPrinter()
321s191ms925us ERROR: GetNetworkAddress() failed
321s192ms129us ERROR: SnmpChannel::Open() _ioChannel.Init() failed

I’d like to capture this in a variable instead of outputting it to the screen, so I can parse through these errors. I tried redirecting the various output streams to a variable, and setting the variable = the command results, but no luck. Any ideas?

Have you tried using the common parameter -ErrorVariable along with -ErrorAction ?

“Test document.” | Out-Printer -Name “\print\printer” -ErrorAction SilentlyContinue -ErrorVariable MyError

"Here is your error $MyError"

or if it still displays the error to the user, handle it in a try, catch

try {
    "Test document." | Out-Printer -Name “\print\printer” -ErrorAction Stop -ErrorVariable myerror
}
catch {
    "Here's your error $myerror"
}


Since it is not returning “PowerShell Errors” but just text that says “ERROR,” that does not work.