How to disable folder and printer sharing in Windows
Folder and printer sharing is a convenient way to work in a networked environment but could pose a security risk. The service, however, could be vulnerable and then exploited, such as in the case of ransomware attacks. Therefore, it is advisable to disable the service when not in use instead of disabling the sharing of specific folders or printers.
File and print sharing service can be disabled in the Advanced sharing settings window from within Control Panel. You can choose to disable the service per network or for all the networks.
Steps to disable folder and printer sharing service in Windows 11:
Launch Manage advanced sharing settings from the Windows search bar.
Choose the network that you want to disable the file and printer sharing service.
Click on the Turn off file and print sharing radio button.
Click on the Save changes button to activate the changes.