AssertNBMutualExclusiveParam
Since
v4.5.8.0
SYNOPSIS
Throws when two or more of the named parameters are present in a bound-parameters dictionary.
SYNTAX
AssertNBMutualExclusiveParam [-BoundParameters] <IDictionary> [-Parameters] <String[]> [[-HelpHint] <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Internal helper used to enforce mutual exclusion between cmdlet parameters at runtime. Throws a terminating ParameterBindingException that names the conflicting parameters.
EXAMPLES
EXAMPLE 1
AssertNBMutualExclusiveParam -BoundParameters $PSBoundParameters -Parameters 'Brief','Fields','Omit'
PARAMETERS
-BoundParameters
The $PSBoundParameters dictionary from the calling cmdlet, or any IDictionary that maps parameter names to values.
Type: IDictionary
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Parameters
The list of parameter names that are mutually exclusive. At least two must be provided; typically 2-5 in practice.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-HelpHint
Optional text appended to the exception message (e.g. a pointer to docs).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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
OUTPUTS
NOTES
AddedInVersion: v4.5.8.0