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
命令提示符未执行powershell脚本_Powershell_Command Prompt_Powershell 4.0 - Fatal编程技术网

命令提示符未执行powershell脚本

命令提示符未执行powershell脚本,powershell,command-prompt,powershell-4.0,Powershell,Command Prompt,Powershell 4.0,我今天尝试运行构建,发现命令提示符无法执行powershell脚本。为了确认这一点,我创建了一个测试powershell脚本,该脚本只写入控制台。该脚本在从powershell运行时工作正常,但命令提示无法识别。下面是截图 关于为什么会发生这种情况,有什么建议/解释吗?解决了这个问题。我在。\Documents\WindowsPowerShell文件夹下创建了一个profile.ps1脚本,以加载powershell的自定义设置。从文件夹中删除profile.ps1或添加-NoProfile

我今天尝试运行构建,发现命令提示符无法执行powershell脚本。为了确认这一点,我创建了一个测试powershell脚本,该脚本只写入控制台。该脚本在从powershell运行时工作正常,但命令提示无法识别。下面是截图


关于为什么会发生这种情况,有什么建议/解释吗?

解决了这个问题。我在
。\Documents\WindowsPowerShell
文件夹下创建了一个
profile.ps1
脚本,以加载powershell的自定义设置。从文件夹中删除
profile.ps1
或添加
-NoProfile
开关参数可以解决此问题