相关疑难解决方法(0)

如何永久使用Powershell为可执行文件添加别名?

在当前的Powershell会话中创建和运行别名,

Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> new-item alias:eadt -value "C:\adt-bundle-windows-x86_64-20140702\eclipse\eclipse.exe"

CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Alias           eadt -> eclipse.exe


PS C:\Windows\system32> eadt
Run Code Online (Sandbox Code Playgroud)

但在新会话中失败:

PS C:\Windows\system32> eadt
eadt : The term 'eadt' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ eadt …
Run Code Online (Sandbox Code Playgroud)

powershell

3
推荐指数
1
解决办法
749
查看次数

标签 统计

powershell ×1