Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在使用NoProfile参数运行Powershell时尝试删除别名不会';行不通_Powershell_Gitlab Ci - Fatal编程技术网

在使用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