I am trying to use following command to map a drive in persistent mode, and I don't want it to ask login credentials everytime I reboot the machine:

net use P: \\server\folder Password123 /user:user123 /savecred /persistent:yes

But I am getting folowing error:

A command was used with conflicting switches.
More help is available by typing NET HELPMSG 3510.

I followed this article: http://pcsupport.about.com/od/commandlinereference/p/net-use-command.htm

Please help with this issue.

Edited by pritaeas: Moved.

5 Years
Discussion Span
Last Post by santakdalai90

I beleive your problem is with the /savecred switch. I dont think you need it. Since you are using the /persistent switch, I dont see why you need the /savecred as well.

The /persistent:yes saves all connections as they are made, and restores them at next logon.

Also on your /user switch, the correct use is /user:domainName\username


Thanks JorgeM for your input. Earlier I used only the /persistent swith, but it is not working properly in Windows server 2008 R2. Everytime I restart it asks for credentials.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.