powershell 创建别名

发布于 / 随记 / 0条评论 / Tags: powershell / 4 次浏览

powsershell 创建alias

1.首先保证.profile 是存在的

New-Item –Path $Profile –Type File –Force

2.创建函数和别名

function Do-ActualThing {
    # do actual thing
}

Set-Alias MyAlias Do-ActualThing

3.重启powershell

    评论区(暂无评论)