在使用NoProfile参数运行Powershell时尝试删除别名不会';行不通
我正在尝试使用在使用NoProfile参数运行Powershell时尝试删除别名不会';行不通,powershell,gitlab-ci,Powershell,Gitlab Ci,我正在尝试使用remove Item alias:echo从Powershell中删除“echo->Write Output”的别名,但在“Powershell-NoProfile”中运行命令时,该别名无效,它仍然引用写入输出别名。我正在尝试在GitLab CI中运行它,GitLab使用“NoProfile”参数运行所有powershell命令。我无法在Windows powershell 5.1和powershell 7.1.3中复制此命令。请让我们知道您使用的是哪个版本/平台,并描述您如何确
remove Item alias:echo
从Powershell中删除“echo->Write Output”的别名,但在“Powershell-NoProfile
”中运行命令时,该别名无效,它仍然引用写入输出别名。我正在尝试在GitLab CI中运行它,GitLab使用“NoProfile”参数运行所有powershell命令。我无法在Windows powershell 5.1和powershell 7.1.3中复制此命令。请让我们知道您使用的是哪个版本/平台,并描述您如何确定它“不工作”PS 5.1.19041.610>powershell-Noprofile删除项目别名:echo;echo-e“Hello”写入输出:无法处理参数,因为参数名称“e”不明确。可能的匹配项包括:-ErrorAction-ErrorVariable。在第1行,char:52+powershell-Noprofile删除项目别名:echo;echo-e“Hello”+~~+CategoryInfo:InvalidArgument:(:)[Write Output],参数BindingException+FullyQualifiedErrorId:AmbiguousParameter,Microsoft.PowerShell.Commands.WriteOutCommand