Get-Command -Name dir CommandType Name ModuleName ----------- ---- ---------- Alias dir -> Get-ChildItem 雖然它通常用於 Cmdlet 和函式, Get-Command 但也會取得腳本、函式、別名和可執行檔。 命令的輸出會顯示別名之 Name 屬性值的特殊檢視。 檢視會
Alias pwd -> Get-Location get-process Alias gps -> Get-Process Alias ps -> Get-Proces rename-item Alias ren -> Rename-Item Alias rni -> Rename-Item tee-object Alias tee -> Tee-Object 名词或谓词 缩写 Get => g Set => s Item => i Location => l Command => cm Alias => al ex...
Get-Command:获取可用命令的列表。 Get-Error:获取最近的错误对象。 Get-Date:获取当前的日期和时间信息。 Get-ADComputer:获取活动目录中计算机对象的信息。 Get-ADGroup:获取活动目录中组对象的信息。 Get-ADOrganizationalUnit:获取活动目录中组织单位对象的信息。 Get-ADDomainController:获取活动目录中域控制器的信息。
语法Get-Command[[-Name]<string[]>][-CommandType{Alias|Function|Filter|Cmdlet|ExternalScript|Application|Script|All}][[-ArgumentList]<O bject[]>][-Module <string[]>][-Syntax][-TotalCount <int>][<CommonParame ters>]Get-Command[-Noun <string[]>][-Verb <string[]>][[-ArgumentList]<Obje...
For example, use the following command to run the function named Map that's hidden by an alias named Map. & (Get-Command -Name Map -CommandType Function) or & (dir Function:\map) You can also save your hidden command in a variable to make it easier to run. For example, the ...
Get-Alias cls 输出 代码语言:javascript 代码运行次数:0 运行 AI代码解释 CommandType Name Version Source---Alias cls->Clear-Host 它可以告诉你别名 cls真实的名字是 clear-host 3.3 powershell 别名兼容性 因为powershell别名很多。所以我们要简单了解其对应关系 这样的话我们再看到别名就明白是什么意思了 比如...
Get-Alias|Where-Object{$_.Options-Match"ReadOnly"} This command gets all aliases in which the value of theOptionsproperty isReadOnly. This command provides a quick way to find the aliases that are built into PowerShell, because they have theReadOnlyoption. ...
Get-Alias PowerShell 不仅包含旧批处理和 Linux 命令的别名。 它还提供其他别名(例如 Get-ChildItem 的别名为 gci),可用于将完整命令替换为其缩写表示法,并最大限度地减少所需的键入量。 通过使用 Get-Alias cmdlet,可以发现别名、别名定义及其运行的命令。 不带参数的 Get-Alias 返回所有已定义的别名...
New-Alias-NameMyAlias-Valuemycommand.exe 但Get-Process的Name参数可以采用一个或多个字符串。 Syntax Get-Process [-Name] <string[]> PowerShell Get-Process-NameExplorer, Winlogon, Services 没有值的参数 某些参数不接受输入,因此它们没有参数值。 不带值的参数是开关参数。 开关参数的使用方式与布尔值类...
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...