PowerShell Great Debate: What's Write-Verbose For?

Don Jones
1 min read
Share:

This was a fascinating thing to see throughout The Scripting Games this year: _When exactly should you use Write-Verbose, and why? _The same question applies to Write-Debug.

“I use Write-Debug to provide developer-level comments in my scripts, since I can turn it on with -Debug to see variable contents.”

  • “I use Write-Verbose to provide developer-level comments in my scripts, since I can turn it on with -Debug to see variable contents.”

See what I mean? Some folks will suggest that Verbose is for “user-friendly status messages;” others eschew Debug entirely and prefer PSBreakpoints for that functionality.
What guidance would you offer for using Write-Verbose and Write-Debug in a script?
[boilerplate greatdebate]