Hi Guys, newbie here on the forums.
I looked for an answer to my question first, so this is more of a follow up to this post:
I use PowerShell quite a lot, but I am no means experienced with scripting/coding.
I have built, what I would class as crude PowerShell applications. A series of functions and a menu system built into a PS1 file.
What I have not been able to yet master is logging.
Just this morning I have found the â€˜start-transcriptâ€™ command, which appears to be exactly what I want.
However, inside my application I suppress the errors so the user has a more elegant experience.
My thinking here is that a transcript, is essentially going to capture whatever is output to the console, and if i have
$ErrorAction = “SilentlyContinue” the errors wont be there to be transcripted.
What I would like to do is run a transcript but also capture the errors, whilst not displaying the errors out to the console.
Is that possible? Hopefully that makes sense?
Many thanks in advance if you are able to help out!