Windows设置别名 打开 PowerShell ,运行 echo $profile,会输出一个文件路径,创建这个文件 PS C:\Users\sunset> echo $profile C:\Users\sunset\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 打开刚创建的文件,按以下格式设置多条别名 function 别名 { 需要替代的命令,可以包含空格 }