我尝试在VirtualBox中安装的Windows 10中的大脚本末尾运行这两个命令:
#Navigate to folder where Vagrant file will be placed
CD "D:\VagrantBoxes\Win8"
#mount Windows box
vagrant init windows_81x64-enterprise_virtualbox_15.07.17.box
#run Vagrant
vagrant up
但我收到错误:
vagrant : The term 'vagrant' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At F:\Scripts\Install_Vagrant.ps1:3 char:1
+ vagrant up
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (vagrant:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
但我可以分别通过PowerShell和PowerShell ISE运行这些命令。此外,我不知道为什么,PowerShell使用注释行执行Vagrant命令。
答案 0 :(得分:2)
尝试将vagrant
替换为vagrant.exe
答案 1 :(得分:1)
对我来说vagrant.exe无法解决问题