我想通过PowerShell在基于Windows的Vagrant机器上安装Windows证书。
我尝试使用此命令
vagrant.exe powershell - c "Import-Certificate -Filepath C:\vagrant\Microcosm.cer"
但我恢复了错误
vagrant.exe : The machine with the name '-' was not found configured for
At line:1 char:1
+ vagrant.exe powershell - c "Import-Certificate -Filepath C:\vagrant\M ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (The machine wit... configured for:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
this Vagrant environment.
答案 0 :(得分:0)
难道你的命令错字了吗?在powershell动词之后,不应该是-c
而不是- c
(请注意空格)。