Hello,
May I know what methods you have tried to disable sharing? Are you in a domain environment?
You can try the following steps to disable file and printer sharing:
- Disable firewall ports (ports 445 and 139). By disabling these ports, you can block SMB communication and thus disable file and printer sharing. Note that doing so may affect other features or services on the network. Before implementation, ensure that relevant tests and backup work are done.
- Edit Group Policy:
Navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options.
Find and enable the policy "Network Access: Do not allow anonymous enumeration of SAM accounts and shares"
Reference:
SMB - File and printer sharing ports should be open | Microsoft Learn
Overview of file sharing using the SMB 3 protocol in Windows Server | Microsoft Learn
Best regards
Jacen
—————————————————————————————————
If the Answer is helpful, please click "Accept Answer" and upvote it.