Crescendo icon indicating copy to clipboard operation
Crescendo copied to clipboard

Call the parser function with conditional -Verbose

Open DennisL68 opened this issue 1 year ago • 0 comments

Summary of the new feature / enhancement

As a PowerShell scripter I'd like to have the option to get verbose output to better trouble shoot my work

Proposed technical implementation details (optional)

Make sure the current Verbose settings is transferred with the calls to the parser.

function MyParser {
  [cmdletbinding()]
  param()

  Write-Verbose 'Hello'
}

Using the syntax below will use verbose mode conditionally based on the current environment setting from where the call is made.

MyParser -Verbose:$VerbosePreference

DennisL68 avatar May 16 '23 16:05 DennisL68