does支持使用script block({ ... })作为分支条件,您可以在其中自由执行任何测试,包括多个值,使用...
Type: SwitchParameter Aliases: cf Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False Applies to: Security & Compliance-EnabledThe Enabled parameter specifies whether the policy is enabled or disabled. Valid values are: $true: The policy...
If multiple File parameters are included, only the last one is used. Each line of the file is read and evaluated by the switch statement. The comparison is case-insensitive. Regex - Performs regular expression matching of the value to the condition. If the match clause is not a string, ...
-CaseSensitive 指示cmdlet 匹配项区分大小写。 默认情况下,匹配项不区分大小写。 类型:SwitchParameter Position:Named 默认值:False 必需:False 接受管道输入:False 接受通配符:False -Context 捕获与模式匹配的行前后的指定行数。 如果你输入一个数字作为此参数的值,则该数字将确定捕获的匹配项前后的行数。 如果你...
Switch ($val) { "Val1" { #work } "Val2" { #work } } Do Until Do { #work } Until ($val -eq "target") Do While Do { #work } While ($val -eq "target") While While ($val -eq "target") { #work } Table 2: Flow Control Operators and Examples ...
When multiple parameter sets are defined, the DefaultParameterSetName keyword of the CmdletBinding attribute specifies the default parameter set. PowerShell uses the default parameter set when it can't determine the parameter set to use based on the information provided to the command. For more info...
As shown in the previous example, multiple script blocks passed using theProcessparameter get mapped to theBeginandEndparameters. To avoid this mapping, you must provide explicit values for theBeginandEndparameters. PowerShell 1..2|ForEach-Object-Begin$null-Process{'one'}, {'two'}, {'three'...
The ConflictResolutionOption parameter specifies what to do if there are multiple matching messages in the target. Valid values are: ForceCopy KeepAll KeepLatestItem KeepSourceItem (This is the default value.) KeepTargetItem UpdateFromSource
When multiple parameter sets are defined, the DefaultParameterSetName keyword of the CmdletBinding attribute specifies the default parameter set. PowerShell uses the default parameter set when it can't determine the parameter set to use based on the information provided to the command. For more info...
You can specify multiple values separated by commas. Expand table Type: String[] Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False Applies to: Exchange Server 2016, Exchange Server 2019, Security & Compliance...