One way is to use $ PSDefaultParameters at the top of the extended function:
$PSDefaultParameterValues = @{"*:Verbose"=($VerbosePreference -eq 'Continue')}
Then, each command that you invoke with the -Verbose parameter will set it, depending on whether you used -Verbose when invoking the extended function.
If you have only a few commands, do the following:
$verbose = [bool]$PSBoundParameters["Verbose"] Invoke-CustomCommandB -Verbose:$verbose
source share