Here’s a way to limit the number of users of a shared folder by using the command net share.
net share <foldersharename> /users:<number>
For example, to specify a limit of five users who can simultaneously browse and connect to your shared folder named Downloads, type:
net share Downloads /users:5
To limit the number of users of a shared folder by using the shared folders window:
type fsmgmt.msc by pressing Win+R or go to Computer Management.
Once Shared Folders opens, click Shares.
In the details pane, right-click any shared folder to supervise, and then click Properties.
Under the User limit group, click to choose “Allow this number of users:”, and specify the limit you want:
By default, the limit is set at the maximum number or Maximum allowed.
Thanks for reading the article!