win10系统在执行“ vagrant box add centos7 vagrant-centos-7.box”添加box时,报错“Vagrant failed to initialize at a very early stage: Failed to locate the powershell executable on the available PATH. ”

这个意思是:
在有效的路径中未能执行PowerShell命令. 请检查PowerShell的安装和有效的路径,然后再尝试重新运行这个命令。

在环境变量path中添加powershell的路径,例如:C:WindowsSystem32WindowsPowerShellv1.0

以上未生效,最后:在C:WindowsSystem32WindowsPowerShellv1.0中双击执行这个powershell,成功执行

参考:https://zhidao.baidu.com/question/140326749776799965.html

原文地址:https://www.cnblogs.com/lxwphp/p/11119445.html