In PowerShell, how to write an error, warning, write-write output to a single file?
When I execute the external command / write -warning / write-error / write-host, I need all the information that needs to be written to the file.
when I redirect the write error to the log file, it will not show the same content as on the console. He will have other information that I do not need.
Is it possible to prefix the error with ERROR :, warning WARN: in the log file?
source share