如何在新窗口中设置启动Powershell新进程的别名?
我想知道是否有一种方法可以创建一个可以快速执行以下操作的别名:如何在新窗口中设置启动Powershell新进程的别名?,powershell,Powershell,我想知道是否有一种方法可以创建一个可以快速执行以下操作的别名: 调用项目C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe 我还没有想出更好的方法来启动 创建此文件: C:\Users\<yourusername>\Documents\WindowsPowerShell\Microsoft.Powershell_Profile.ps1 打开新的Powershell窗口 键入启动Powershell 您可以随意命名“启
调用项目C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
我还没有想出更好的方法来启动
C:\Users\<yourusername>\Documents\WindowsPowerShell\Microsoft.Powershell_Profile.ps1
启动Powershell
C:\Users\<yourusername>\Documents\WindowsPowerShell\Microsoft.Powershell_Profile.ps1
启动Powershell
您可以随意命名“启动Powershell”(函数名称)。这是您的新“别名”,它在您的用户环境中工作并具有自动完成功能。别名只能引用其他命令名。对于任何其他需要函数的内容:
function foo{Start Process powershell.exe}
别名只能引用其他命令名。对于任何其他需要函数的内容:function foo{Start Process powershell.exe}