Determine Domain and username used to map a network drive

Solution 1:

WMI is your friend:

> wmic netuse where LocalName="Z:" get UserName /value

UserName=rd-pc2037\Administrator

Solution 2:

None of these answers help when using alternate credentials. They only show the current, local user. That doesn't help.

To view all stored credentials, use...

rundll32.exe keymgr.dll, KRShowKeyMgr