How can I add a network location with a space in the name to Windows Credential Manager?


My company has a backup server that has a space in its name ("Foo Bar").

I am trying to add the login credentials for this server to Windows Credential Manager, but I receive a canned error response (I am assuming this is due to the space. No space, no error):

Windows cannot save this information. Make sure the information is correct
and that all required fields are completed. 

Error code: 0x80070057. 
Error message: The parameter is incorrect

I have tried the following:

  • Its network IP address (credential manager doesn't seem to ID an IP and server name as the same?)
  • \\Foo Bar\foobar
  • "\\Foo Bar\foobar" (same 0x80070057 error)
  • \\Foo%20Bar\foobar (does not link to the server)
  • \\FooBar\foobar (doesn't ID)
  • \\Foo-Bar\foobar (doesn't ID)
  • "Foo Bar" (same 0x80070057 error)

Unfortunately, I do not have permission to undertake the simplest solution (properly naming the server!).

Any ideas?

asked on Super User Aug 25, 2011 by Nick

2 Answers


If you can successfully connect to the share via Net Use I believe you can use the /savecred option to save those credentials into the WCM.

You will probably have to enclose the server/share name in quotes to prevent confusion by the space. IE: Net Use K: "\\Server Name\ShareName"

For the net use command to save the credentials in Credential Manager, use the /savecred switch. When you use the /savecred switch, any credentials that you are prompted for when you use the net use command are saved as a key.

Info here and here.

answered on Super User Aug 25, 2011 by Ƭᴇcʜιᴇ007

You can use the ^ to escape certain characters in Windows as well. Not sure if it will work but try \Foo^ Bar\foobar

answered on Super User Aug 25, 2011 by OldWolf

User contributions licensed under CC BY-SA 3.0