diff --git a/plugins/guests/windows/cap/mount_shared_folder.rb b/plugins/guests/windows/cap/mount_shared_folder.rb index 6ce3735e7..03cb120ea 100644 --- a/plugins/guests/windows/cap/mount_shared_folder.rb +++ b/plugins/guests/windows/cap/mount_shared_folder.rb @@ -22,7 +22,7 @@ module VagrantPlugins # Ensure password is scrubbed Vagrant::Util::CredentialScrubber.sensitive(options[:smb_password]) end - machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:#{options[:smb_password]}", {shell: :powershell, elevated: true}) + machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:\"#{options[:smb_password]}\"", {shell: :powershell, elevated: true}) mount_shared_folder(machine, name, guestpath, "\\\\#{options[:smb_host]}\\") end