PowerShell Verbose Messages not appearing in the console? Its normal, but lets fix that.

On a very basic level, I love verbose messages, especially in the PowerShell console. They are yellow, which helps them stick out when debugging and troubleshooting PowerShell scripts. Today, I created a function and used Write-Verbose but when I executed the function, the verbose message did not display in the console. Turns out, this is normal by in PowerShell as its the default setting. Unless you tell PowerShell to set this, it will not display verbose messages. To enable it, we simply change the value of¬†$VerbosePreference¬†to “Continue”.

Boom, now verbose messages will show.

Now if I want to change that setting by default when I am running in a session, I can just add that to my PowerShell profile.

Going forward, verbose messages will appear when using Write-Verbose.

Leave a Reply

Your email address will not be published. Required fields are marked *