For more information about aliases that can be used with specific parameters, see Common Parameter Names. Defining Parameter Aliases To define an alias for a parameter, declare the Alias attribute, as shown in
For example, to create the gh alias for Get-Help, type: PowerShell Copy New-Alias -Name gh -Value Get-Help You can use the alias in commands, just as you would use the full cmdlet name, and you can use the alias with parameters. For example, to get detailed Help for the Get-...
New-Alias[-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] 说明 New-Aliascmdlet 在当前 PowerShell 会话中创建新的别名。 退出会话或关闭 PowerShell 后,不会保存使...
-Examples [-Functionality <System.String[]>] [-Path <System.String>] [-Role <System.String[]>] [<CommonParameters>] Get-Help [[-Name] <System.String>] [-Category {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter | ExternalScript ...
Write-SSMParameter ` -Name "parameter-name" ` -Value "parameter-value" ` -Type "SecureString" ` -KeyId "an AWS KMS key ID, an AWS KMS key ARN, an alias name, or an alias ARN" ` -Tags $tag 如果成功,該命令將會傳回參數的版本號碼。 注意 若要使用 AWS 受管金鑰 指派給您帳戶的 ,...
private string _name = "PowerShellIsolatedStore"; /// name of store [Alias("Filename")] [Parameter] public string Name { get { return _name; } set { _name = value; } } Common ParametersWindows PowerShell reserves a few parameter names, referred to as Common parameters, which you ...
Alias:当前会话中的所有 PowerShell 别名。 All:所有命令类型。 它等效于 Get-Command -Name *。 Application:PATH 环境变量($Env:PATH)中列出的路径中除 PowerShell 文件以外的所有文件,包括 .txt、.exe和 .dll 文件。 Cmdlet:当前会话中的 cmdlet。 Cmdlet 是默认值。 Configuration:PowerShell 配置。 有关详...
You can use Name or its alias, ServiceName, or you can omit the parameter name. Required? true Position? 0 Default value None Accept pipeline input? True (ByPropertyName, ByValue) Accept wildcard characters? false 通过管道将对象发送到 Start-Service 时,PowerShell 会尝试将对象与 InputObject...
The risk mitigation parameters are: -WhatIf (wi) -Confirm (cf) For more information about preference variables, type: help about_Preference_Variables COMMON PARAMETER DESCRIPTIONS -Debug[:{$true | $false}] Alias: db Displays programmer-level detail about the operation performed by the command. ...
在此示例中,Get-Alias 和Get-Command 与Out-File cmdlet 一起使用,在当前目录中创建两个文本文件,Alias.txt 和Command.txt。 Select-String 使用带星号()通配符的 * 参数搜索当前目录中具有文件扩展名 .txt的所有文件。 Pattern 参数指定要匹配 Get-的文本。 Select-String PowerShell 控制台中显示输出。 文件名...