win10 配置命令别名

2023-03-02  本文已影响0人  Joncc

首先使用 Test-Path $profile 查看是否有 profile 文件, 如果显示 flase 则执行2
New-Item -path $profile -itemtype file -Force 返回一个目录,去打开编辑这个文件
文件添加

function suser {ssh user@10.1.1.100}

打开一个管理员模式的 power shell 执行 Set-Executionpolicy Remotesigned
重新打开一个 power shell, 别名即可使用

上一篇 下一篇

猜你喜欢

热点阅读