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...
In PowerShell, switch maps to System.Management.Automation.SwitchParameter.4.2.6 Enumeration typesAn enumeration type is one that defines a set of named constants representing all the possible values that can be assigned to an object of that enumeration type. In some cases, the set of values ...
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....
Get-Command [-Verb <String[]>] [-Noun <String[]>] [-Module <String[]>] [-FullyQualifiedModule <ModuleSpecification[]>] [-TotalCount <Int32>] [-Syntax] [-ShowCommandInfo] [[-ArgumentList] <Object[]>] [-All] [-ListImported] [-ParameterName <String[]>] [-ParameterType <PSTypeName...
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...
The VerifyRecipient parameter specifies a single recipient with which to verify the synchronization status. You identify the recipient by specifying a proxy address assigned to the recipient. The proxy address is the recipient's email address. The recipient verification test is mutually exclusive of th...
the script by using two sets of mutually exclusive parameters. Windows PowerShell calls theseparameter sets. The parameter sets’ names (PathandLiteralPath) are defined in the statement at the top of the script, and the script’sCmdletBindingattribute specifies thatPathis the default parameter 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. ...
When this is defined, a snapshot of the instance's system volume is created.This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive. Required? False Position? Named Accept pipeline input? True (ByPropertyName) -...
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...