I have a number of servers on the network and occasionally I need to connect to all of them to copy files across, or just make changes.

When I use Windows Explorer and enter a path like \\server01\c$\some\directory\, I get a Network Error:

network error

This happens when I haven't previously (in the current session) connected to the drive specified in the path. So in the above example, if I was to first try \\server01\c$, I will get a security popup like so:

security popup

I can then enter my details, and then re-navigate to the original path and I can see it just fine.

My question is, can I script this process? Ideally I want to have a text file or similar of all the server names, then run a script which will do the login phase for all of the servers. Then I am free to do what I need without repeatedly logging in. I am not sure what to look for when searching for solutions to this online since the keywords are quite generic.

I have used online images for the screenshots, hence the difference in window style...

  • "Remember my credentials" will put them into Windows' Credential Manager. You can also manually add credentials to the Credential Manager, so perhaps try that? – Ƭᴇcʜιᴇ007 Nov 9 '15 at 14:27
  • Hmm, I tried adding the server name to the Credentials Manager (with and without the c$ bit) but I still get the Security popup. Also I don't get the 'remember your credentials' option so I'm wondering if group policy is blocking password storing... – Arj Nov 9 '15 at 15:33

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.