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, you can't use the Full and Detailed parameters of Get-Help together because they belo...
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, you can't use theFullandDetailedparameters ofGet-Helptogether because they belong to di...
[Experimental("MyModule.PSNewAddTypeCompilation", ExperimentAction.Show)] [Parameter(ParameterSet ="NewCompilation")]publicCompilationParameters CompileParameters { ... } [Experimental("MyModule.PSNewAddTypeCompilation", ExperimentAction.Hide)] [Parameter()]publicCodeDom CodeDom { ... } ...
A Parameter Set is a mutually exclusive set of parameters. Mutually exclusive means you can either get a process by name, or by id, but not by name and id at the same time. Each parameter set is a different way to interact with the cmdlet, almost like a different cmdlet with the same...
For a sample showing how to use flag enumerations and check whether a flag is set, see Example 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 vali...
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 ...
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. ...
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...
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 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. ...