How to list all shares? How to cmdline remove GRANT for everyone ?


Extraordinary Member
To create a folder share and grant full permissions to user karl I can write on cmdline:

net share "myshare123"="D:\tool" /GRANT:karl,FULL

ok, it works.

But what about the other way:

Is there a way to generate all the full "net share" commands for ALL currently existing folder shares?
I don't want to enter manually the command for (changing) 30 folder shares....

What is the opposite to the parameter /GRANT:karl,FULL?
In other words: how do I remove all existing permissions for e.g. "Everyone"?
Last edited:


Cyber Security Engineer
Staff member
The net share command is pretty limited. You'd need to stop sharing and re-share with the appropriate permissions. There also is no DENY permissions from the net share command.

You can however apply deny permissions by right clicking the folder being shared > properties > Sharing > Advanced Sharing and add a DENY permission