Get-Command:获取可用命令的列表。 Get-Error:获取最近的错误对象。 Get-Date:获取当前的日期和时间信息。 Get-ADComputer:获取活动目录中计算机对象的信息。 Get-ADGroup:获取活动目录中组对象的信息。 Get-ADOrganizationalUnit:获取活动目录中组织单位对象的信息。 Get-ADDomainController:获取活动目录中域控制器的信息。
在此示例中,命令的名称故意出现拼写错误“get-commnd”。 使用-UseFuzzyMatching开关,cmdlet 确定最佳的匹配项是Get-Command后跟系统上其他类似匹配的本机命令。 PowerShell Get-Commandget-commnd-UseFuzzyMatchingCommandType Name Version Source --- --- --- --- CmdletGet-Command6.2.0.0Microsoft.PowerShell.Cor...
{Error | Information | FailureAudit | SuccessAudit | Warning}] [-Index <System.Int32[]>] [-Message <System.String>] [-Newest <System.Int32>] [-Source <System.String[]>] [-UserName <System.String[]>] [<CommonParameters>] Get-EventLog [-AsString] [-ComputerName <System.String[]>]...
PowerShell.Commands Assembly: Microsoft.PowerShell.Commands.Management.dll Package: Microsoft.PowerShell.5.1.ReferenceAssemblies v1.0.0 get or sets an array of Source C# 複製 public string[] Source { get; set; } Property Value String[] Applies to 產品版本 Windows PowerShell 5.1.0.0 ...
此变量的值也可在 Get-Event 返回的 PSEventArgs (System.Management.Automation.PSEventArgs) 对象的 Sender 属性中找到。 $ShellID 包含当前 shell 的标识符。 $SourceArgs 包含表示正在被处理的事件的事件参数的对象。此变量只在事件注册命令的 Action
get-command CommandTypeNameVersionSource --- AliasAdd-AppPackage2.0.1.0Appx AliasAdd-AppPackageVolume2.0.1.0Appx AliasAdd-AppProvisionedPackage3.0Dism AliasAdd-ProvisionedAppPackage3.0Dism AliasAdd-ProvisionedAppxPackage3.0Dism AliasAdd-ProvisioningPackage3.0Provisioning...
Downloading the Source Code You can clone the repository: git clone https://github.com/PowerShell/PowerShell.git For more information, seeworking with the PowerShell repository. Developing and Contributing Please look into theContribution Guideto know how to develop and contribute. If you are devel...
Get-Alias cls 输出 代码语言:javascript 代码运行次数:0 运行 AI代码解释 CommandType Name Version Source---Alias cls->Clear-Host 它可以告诉你别名 cls真实的名字是 clear-host 3.3 powershell 别名兼容性 因为powershell别名很多。所以我们要简单了解其对应关系 这样的话我们再看到别名就明白是什么意思了 比如...
通过提供SourcePath参数的默认值,此组策略设置会将SourcePath参数隐式添加到所有Update-Help命令。 用户可以通过输入不同的文件系统位置来替代指定为默认值的特定文件系统位置。 但他们无法从Update-Help命令中删除SourcePath参数。 如果启用此策略设置,则可以为SourcePath参数指定默认值。 输入文件系统位置。
Set-PSReadLineOption-PredictionSource History # 每次回溯输入历史,光标定位于输入内容末尾 Set-PSReadLineOption-HistorySearchCursorMovesToEnd # 设置 Tab 为菜单补全和 Intellisense Set-PSReadLineKeyHandler-Key"Tab"-Function MenuComplete # 设置 Ctrl+d 为退出 PowerShell ...