<Parameter(ParameterSetName:="ProcessId", _ Mandatory:=True, _ ValueFromPipelineByPropertyName:=True, _ ValueFromPipeline:=True), [Alias]("ProcessId")> _ Public Property Id() As Integer() Get Return processIds End Get Set(ByVal value As Integer()) processIds = value End Set End Prope...
param( [Parameter(Mandatory, ParameterSetName="Computer")] [string[]]$ComputerName, [Parameter(Mandatory, ParameterSetName="User")] [string[]]$UserName, [Parameter()] [switch]$Summary ) 每個自變數中只能指定一個ParameterSetName值,而且每個ParameterSetName屬性中只能指定一個自變數。 若...
For example, the Get-EventLog cmdlet (built into Windows PowerShell) returns different information when the user specifies the List or LogName parameter. When LogName is specified, the cmdlet returns information about the events in a given event log. However, when List is specified, the cmdlet ...
PS C:\Users\vol_20120330> get-help get-command-parameter * -ArgumentList<Object[]>获取 cmdlet 或函数在与指定的参数(如path)一起使用时的信息。ArgumentList 的别名为 Args。 要检测在 cmdlet 与特定的提供程序一起使用时添加到 cmdlet 中的参数,请将 ArgumentList 的值设置为提供程序驱动器中的一条路径...
[ClassName]::MethodName(parameter list) To call a method on an object, place a dot between the variable that represents that object and the method name: $objectReference.MethodName(parameter list) PS C:Usersv-ylian>Get-Process | where {$_.Id -eq 3700} ...
-PassThru仅当命令中还使用了 OutFile 参数时,此参数才有效。 目的是将结果写入文件并写入管道。 展开表 类型: SwitchParameter Position: Named 默认值: No output 必需: False 接受管道输入: False 接受通配符: False-PreserveAuthorizationOnRedirect指示cmdlet 应在重定向之间保留 Authorization 标头(如果存在)。
-PassThru 返回一个表示别名的对象。 使用格式 cmdlet(如 Format-List)显示对象。 默认情况下,Set-Alias 不会生成任何输出。 展开表 Type: SwitchParameter Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False -Scope 指定此别名的有效范围。 默...
Forms in PowerShell: putting checkboxes inside a listbox Forms in PowerShell: Use System.Windows.Forms.ProgressBar to Display progress in real-time ftp upload subfolder content with powershell script... get trouble reading from subfolder Function "Main" in PowerShell Function parameter validation,...
-PassThru仅当命令中还使用了 OutFile 参数时,此参数才有效。 目的是将结果写入文件并写入管道。 展开表 类型: SwitchParameter Position: Named 默认值: No output 必需: False 接受管道输入: False 接受通配符: False-PreserveAuthorizationOnRedirect指示cmdlet 应在重定向之间保留 Authorization 标头(如果存在)。
Add helper in EnumSingleTypeConverter to get enum names as array (#17785) (Thanks @fflaten!) Return correct FileName property for Get-Item when listing alternate data streams (#18019) (Thanks @kilasuit!) Add -ExcludeModule parameter to Get-Command (#18955) (Thanks @MartinGC94!) Update Nam...