Determine Domain and username used to map a network drive

前端 未结 3 1905
[愿得一人]
[愿得一人] 2021-01-30 10:41

Using Windows 7 Enterprise with SP1, but I\'m hoping to get a generic answer that would apply to Windows XP/2003/2008/Vista/7.

From a command prompt, I execute a

相关标签:
3条回答
  • 2021-01-30 10:41

    According to http://technet.microsoft.com/en-us/library/cc957215.aspx the information you want is in the registry.

    I have tried the wmic-command but it showed me the locally logged in user and not the "used DOMAIN\login"


    The critical info from the link above:

    Registry entry HKCU\Network\{Drive letter}\UserName is a REG_SZ that specifies the username (including domain name) whose credentials were used when the network drive was mapped.

    0 讨论(0)
  • 2021-01-30 11:07

    WMI is your friend:

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

    UserName=rd-pc2037\Administrator
    
    0 讨论(0)
  • 2021-01-30 11:07

    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
    
    0 讨论(0)
提交回复
热议问题