Powershell apply verbosity at a global level

You could also do:

$global:VerbosePreference = 'continue'

Works better then PSDefaultParameters as it tolerates function not having Verbose param.


Use $PSDefaultParameterValues:

$PSDefaultParameterValues['New-Item:Verbose'] = $true

Set that in the Global scope, and then the default value of -Verbose for the New-Item cmdlet will be $True.

You can use wildcards for the cmdletsyou want to affect:

$PSDefaultParameterValues['New-*:Verbose'] = $true

Will set it for all New-* cmdlets.

$PSDefaultParameterValues['*:Verbose'] = $true

will set it for all cmdlets.