Sfc /scannow output garbled

Having trouble writing a toolbox to run powershell command

sfc /scannow

I get weird encoding in the toolbox results. Did some searches but haven’t solved the issue. I don’t really want it to write to a file, but output in toolbox results.

Am shamelessly asking for a powershell command that works. :slight_smile:

This seems to work..

sfc /scannow | ForEach-Object {
    ($_ -replace '[^\x20-\x7E\r\n]', '')
}

run as powershell script

wait …

Run as Service User