Parameter sets are mutually exclusive. Once you specify a unique parameter that only exists in one parameter set, PowerShell limits you to using the parameters contained within that parameter set. For instance,
[Experimental("MyModule.PSNewAddTypeCompilation", ExperimentAction.Show)] [Parameter(ParameterSet ="NewCompilation")]publicCompilationParameters CompileParameters { ... } [Experimental("MyModule.PSNewAddTypeCompilation", ExperimentAction.Hide)] [Parameter()]publicCodeDom CodeDom { ... } ...
For a sample showing how to use flag enumerations and check whether a flag is set, seeExample 3. Enumerations as parameters You can define cmdlet parameters that use an enum as their type. When you specify an enum as the type for a parameter, users get automatic completion for and valida...
You can display messages by including the server name as part of the Identity parameter or the Queue parameter or by including the Server parameter with a filter query. The Identity parameter, Queue parameter, and Filter parameter settings are mutually exclusive. You need to be assigned ...
function Set-Something { [CmdletBinding()] param ( [Parameter()] [string]$Thing ) Write-Host $Thing } A function contains one or more option parameters inside of a parameter block and a body. Language constructs As a scripting language, PowerShell offers several language constructs that control...
This parameter must be set to $false if the RequireTLS parameter is set to $true. Valid values for this parameter are $true or $false. Expand table Type: Boolean Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False Applies to:...
the ModuleSpecification class to help you get the desired version of a module; this property is mutually exclusive with the ModuleVersion property. RequiredVersion is now supported as part of the value of the FullyQualifiedName parameter of the Get-Module, Import-Module, and Remo...
If HighPriority were mandatory, PowerShell would interpret neither to be the “Low” set with its optional parameter omitted. If a set can’t be used without a parameter, that parameter really should be mandatory, but when a set has a single parameter specifying the parameter selects the set...
The name of the parameter to pass this value to. password string ThePasswordfor the PSCredential value. This is mutually exclusive withvalueand must be set whenusernameis provided. username string TheUserNamefor the PSCredential value. This is mutually exclusive withvalue. ...
The unique name of the source instance (Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of the instance's system volume is created.This parameter cannot be defined together with thedisk nameparameter. Theinstance nameanddisk nameparameters are mutually exclusive. ...