美文网首页
win10 配置命令别名

win10 配置命令别名

作者: Joncc | 来源:发表于2023-03-02 14:09 被阅读0次

    首先使用 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, 别名即可使用

    相关文章

      网友评论

          本文标题:win10 配置命令别名

          本文链接:https://www.haomeiwen.com/subject/vryjldtx.html