Vagrant unable to mount SMB after upgrade to 1.7.4


I'm using vagrant on windows 8, with the hyper-v provider starting a windows server 2012 box.

Before I updated to vagrant 1.7.4 I was on version 1.7.2, and everything worked.

But after updating I am getting an error when it is trying to mount the shared folder:

The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cmdkey / /user:DOMAIN\user /pass:Password

Stdout from the command:

Stderr from the command:

Exception calling "RegisterTaskDefinition" with "7" argument(s): "The user
name or password is incorrect. (Exception from HRESULT: 0x8007052E)"
At C:\tmp\vagrant-elevated-shell.ps1:58 char:1
+ $folder.RegisterTaskDefinition($task_name, $task, 6, $username, $password,
1, $n ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ComMethodTargetInvocation

I have replaced the details from the line:

cmdkey / /user:DOMAIN\user /pass:Password

With placeholders for obvious reasons. I did try and run the command above in the VM and I get the following output:

CMDKEY: Credential added successfully.

So I assume it is working correctly. Has something changed or broken in 1.7.4?

asked on Stack Overflow Aug 13, 2015 by Matthew Wilson • edited Aug 13, 2015 by Matthew Wilson

1 Answer


I have figured out a fix for this.

Our password contained dollar signs ($), these were being stripped out in the vagrant-elevated-shell.ps1 script.

I have forked the vagrant repo and made the change and made a pull request -

To patch your local environment, you can find the communicator.rb file on your local machine at:


(provided you used the default setting in the installer)

answered on Stack Overflow Oct 28, 2015 by Matthew Wilson

User contributions licensed under CC BY-SA 3.0