2

I have two different accounts on a WebDAV server for various reasons, basically along the lines of personal files in one and work/school-type related files in another. Everything is wiped upon reboot, so I have a length PowerShell script to setup my environment and a batch script that merely maps the proper WebDAV drives. I have it setup to ask for y/n and map one set of drives on y and another set on n.

Generally, I only do personal work in one session or non-personal work in one session, but sometimes I am at a workstation for several hours and may eventually switch gears. It's a hassle to logout and log back in (and it takes several minutes), and I usually have many tabs open in a browser that would be cumbersome to reopen.

I tried deleting the cached credentials in Credential Manager like this answer suggested: by going to rundll32.exe keymgr.dll, KRShowKeyMgr and then deleting the entry there.

After doing this, I was still able to access the drives I had mapped. So, I manually disconnected the drives and reran the batch script.

However, indicating that I wanted to map the other set of drives did nothing. When I tried mapping the same drives again, they mapped without prompting me for credentials, even though Credential Manager was empty!

Is there somewhere besides Credential Manager, in addition to what the aforementioned answer instructed, that I need to go to in order to properly delete the credentials, so I can remap as if from a fresh login?

Proposed Solutions That Don't Work:

  • Using net use * delete does not work.
  • Using for /F "tokens=1,2 delims= " %G in ('cmdkey /list ^| findstr Target') do cmdkey /delete %H also does not work.
  • Using the IP address of the server to map the folder instead of the domain name. I have heard this can work to get around this restriction for LAN servers. The server is d.docs.live.net and when I try mapping using IP address, this fails. Otherwise, I wouldn't mind doing this is I have no problem mapping both sets of drives simultaneously either.
  • @PimpJuiceIT Windows 10. Tried everything in your first comment, it did not work. I tried clearing credits and then doing the commands and then the other way around and neither way worked. When I run the batch script with the n switch, it automatically remaps the same drive without prompting for credits, despite CredMangager being empty and no active net use connections – InterLinked Jul 12 '18 at 2:54
  • 1
    1.) Okay, I'm not certain if this will work or not because I can't test myself right now but d.docs.live.net has DNS aliases as per the nslookup results so not sure if one of those names would work in place of d.docs.live.net but you can easily test this with these aliases just in case. From admin elevated cmd run nslookup d.docs.live.net and you can copy the aliases and use those in lieu: i.imgur.com/siXacfT.png – Pimp Juice IT Jul 12 '18 at 3:52
  • @PimpJuiceIT For your first suggestion: I tried all of the ones in your screenshot. The first time I would try to use one of them, I got System error 1790 (The network logon has failed). After that I got System error 59 (An unexpected error has occurred). I would like to do #1 if that can be gotten to work; #2 would be way too much hassle: no admin rights and everything is wiped. – InterLinked Jul 12 '18 at 20:15
  • @PimpJuiceIT If I supply the password in the script (which I wouldn't do normally) I get System error 1244 has occurred. The operation being requested was not performed because the user has not been authenticated. – InterLinked Jul 12 '18 at 20:23
  • @PimpJuiceIT Tried PowerShell too, just get The operation being requested was not performed because the user has not been authenticated. – InterLinked Jul 12 '18 at 20:30

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.