Test Verbose
Last Modified: February 25, 2024 18:18 CEST

Test-Verbose #

SYNOPSIS #

Tests if the verbose switch is set

SYNTAX #

Test-Verbose [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION #

Tests if the verbose switch is set.

EXAMPLES #

Example 1:Tests if verbose mode is active #

PS C:\> if (Test-Verbose) { Write-Host 'We are in verbose mode' }

When the verbose switch is active, the following message is displayed: We are in verbose mode.

PARAMETERS #

CommonParameters #

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS #

None #

OUTPUTS #

System.Object #

NOTES #