在PowerShell 中,switch 對應至 System.Management.Automation.SwitchParameter。 4.2.6 列舉類型 列舉型別是定義一組具名常數的列舉型別,代表可指派給該列舉型別之物件的所有可能值。 在某些情況下,這組值的特性導致每次只能表示其中一個值。 在其他情況下,一組值是兩個相異的乘冪,而且使用 -bor 運算符 (7.8....
Type: String Parameter Sets: SearchByConnectorNameDistinguishedName, SearchByConnectorName Aliases: Required: True Position: 0 Default value: None Accept pipeline input: False Accept wildcard characters: False -DistinguishedNameThe distinguished name of the connector space object.YAML...
Switch parameters are just the opposite in that you specify the parameter but the argument is left out. The interpreter assigns the parameter a value based on whether the parameter is present or not. To specify a switch type parameter, you should use the "[switch]" type literal in the para...
private string _key = null; [Parameter( Mandatory=true, Position=1, ValueFromPipelineByPropertyName=true )] public string Key { get { return _key; } set { _key = value; } } private string _value = null; /// the value to store [Parameter( Mandatory=true, Position=2, ValueFrom...
公共参数也可用于使用CmdletBinding特性或Parameter特性的高级函数。 使用这些属性时,PowerShell 会自动添加通用参数。 不能创建使用与通用参数相同的名称的任何参数。 多个通用参数会重写使用 PowerShell 首选项变量设置的系统默认值或首选项。 与首选项变量不同,通用参数仅影响使用它们的命令。
>] [-Confirm [<SwitchParameter] [-Filter <ScriptBlock>] [-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>] Get-SPSite -Identity <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [...
For more information, see the topic, "about_CommonParameters," which you can accessed by typing the following command, and then pressing ENTER:PowerShell نسخ Get-Help about_CommonParameters OutputsThis cmdlet outputs a String type object if the Verbose common parameter is included; otherw...
When inheriting from a generic class or interface, the type parameter for the generic must already be defined. A class can't define itself as the type parameter for a class or interface. Workaround: To derive from a generic base class or interface, define the custom type in a different ...
This parameter uses a text search string or a query that's formatted by using the Keyword Query Language (KQL). For more information, see Keyword Query Language (KQL) syntax reference and Keyword queries and search conditions for eDiscovery. Expand table Type: String Position: Named Default ...
[-Filter <ScriptBlock>] [-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>] Get-SPSite -Identity <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Filter <ScriptBlock>] [-Limit ...