سلام
از طریق Group Policy اقدام کنید:
https://technet.microsoft.com/en-us/...(v=ws.10).aspx
کد:
To enable or disable file sharing for a user or group by using Group Policy
- Start Group Policy Management Console (GPMC). To do so, click Start, and then in the Start Search box, type gpmc.msc.
- In the navigation pane, open the following folders: Local Computer Policy, User Configuration, Administrative Templates,Windows Components, and Network Sharing.
- In the details pane, double-click Prevent users from sharing files within their profile.
- Do one of the following:
- To enable the Group Policy setting, and disable the user's ability to share files, click Enabled.
- To disable the Group Policy setting, and enable the user's ability to share files, click Disabled.
- Click OK to save your changes