As noted in list network shares from command prompt, in Command Prompt (cmd.exe
), I can use the following command to list available network shares:
net view \\computer
In my case, this gives something like:
C:\Users\user> net view \\COMPUTERNAME
Shared resources at \\COMPUTERNAME
TEST-FILE
Share name Type Used as Comment
-------------------------------------------------------------------------------
archive Disk Fileserver
myfiles Disk Fileserver
MyShare Disk (UNC)
...
However, if you type net use
and press enter, you should get a list of all network shares you're connected to currently. - and in my case, I get:
$ net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK \\COMPUTERNAME\MyShare Microsoft Windows Network
OK \\COMPUTERNAME\IPC$ Microsoft Windows Network
The command completed successfully.
Usually, whenever I want to access \\COMPUTERNAME
and I am not authenticated, I need to authenticate with a login and password.
So, if the authentication dialog does not show, that means I am already logged in - but I cannot tell what username I am logged in as.
Is there any way to see from the command line, which login have I authenticated with, to gain access to a \\COMPUTERNAME
share?