📎 AI Summary:
The original poster seeks a way to automatically generate "net share" commands to manage multiple folder shares and remove existing permissions like "Everyone" without manual entry. The respondent explains that the "net share" command is limited and cannot handle permission removal directly; to change permissions or deny access, manual adjustments through folder properties are necessary. Overall, the discussion highlights limitations in batch managing share permissions via command line.

pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
Thread Author #1
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:
Solution
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

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
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
 

Solution