CMD: Find shares and users in them

CMD: Find shares and users in them

How to find shares and users in them, using command prompt

Once in a while, one needs to find what is shared and who have access. Luckily this is fairly straight forward using CMD in Windows

[snippet]net share[/snippet]

In Windows, open up CMD and run net share

[snippet]Share name Resource Remark

-------------------------------------------------------------------------------
ADMIN$ C:\Windows Remote Admin
C$ C:\ Default share
D$ D:\ Default share
E$ E:\ Default share
H$ H:\ Default share
In H:\Application\input\subfolder\In
input H:\Application\input
output H:\Application\output
[/snippet]

This will list all folders being shared and their path, called resource

[snippet]net share [sharename][/snippet]

To find user's belonging to this share, CMD needs to be run as admin. Then you can run net share [sharename], replace [sharename] with actual share name

[snippet]Share name input
Path H:\Application\input
Remark
Maximum users No limit
Users SN06324 YF125324 SP63532
gr129346 EY74786 JH129235
SB123576 OY99765
Caching Manual caching of documents
Permission BUILTIN\Administrators, FULL
Everyone, FULL

The command completed successfully.
[/snippet]

This will list users usernames, plus some more information of the share



Tags: #CMD #netshare #Windows

We sometimes publish affiliate links and these always needs to follow our editorial policy, for more information check out our affiliate link policy

You might also like

Comments

Sign up or Login to post a comment

There are no comments, be the first to comment.