How to Enable or Disable File and Printer Sharing in Windows 10

Introduction

In this article, I describe how to enable or disable file and printer sharing in Windows 10. This is a key feature in the Windows family for sharing files and printers on the network with other users.

We can also use this feature in Windows 10 to share files and printers on the network. The file-sharing feature is a process that enables the user to share files in a shared folder that are accessible to other users on the same network. Similarly, the printer-sharing feature allows multiple computers to connect to the same network to access common printers. When the file and printer sharing feature is turned on, the files and printers that you share from the computer are accessed by other users on the same network.

When we need to share the file and printer with other users on the network, we have different options to enable it to use different methods such as command prompt, Windows PowerShell, and control panel.

This tutorial will show you the steps on how to enable or disable file and printer sharing in Windows 10.

Method 1. Using Command Prompt

By using the Command Prompt (Admin), the user can easily enable or disable file and printer sharing options. Follow the below instructions to proceed.

Step 1. From the Search, type the Command Prompt right-click on it, and select "Run as Administrator".

Step 2

A) To turn off (disable) the file and printer sharing option, type the following command in the command prompt.

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=No

Printer Sharing

B)To turn on the file and printer sharing, type the following command in the command prompt.

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes

Command prompt

Method 2. Using Windows PowerShell (Admin)

By using Windows PowerShell, the user can easily enable or disable file and printer sharing options. Follow the below instructions to proceed.

Step 1. Open Windows PowerShell (Admin). (Alternatively, you can press the "Windows + X" key and click on "Windows PowerShell (Admin)" to open it.)

Step 2

A) To turn off (disable) the File and printer sharing option for different profiles, type the following command in the Windows PowerShell (Admin).

1) For all Network Profile

Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Any

 Network Profile

2) Similarly, for the Public Network Profile

Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Public

B)To turn on (enable) the File and printer sharing option for different profiles, type the following command in the Windows PowerShell (Admin).

1) For all Network Profile

Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Any

DisplayGroup

2) Similarly, for the Public Network Profile

Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Public

Method 3. Through Control Panel

With the help of the Control Panel, the user can easily enable or disable file and printer-sharing options. Follow the below instructions to proceed.

Step 1. Open Control Panel.

Step 2. Click on the "View network status and tasks" option under the "Network and Internet" section.

View network

Step 3. On the left side, click on the "Change advanced sharing settings" option.

Change advanced sharing settings

Step 4. Now, the users can choose the different network profiles as per their requirements.

A) To disable (turn off) the file and printer sharing option, click on the "Turn off file and printer sharing" option under the File and printer sharing section and click on the "Save changes" button.

Save changes

B) To enable the file and printer sharing option, click on the "Turn off file and printer sharing" option under the File and printer sharing section and click on the "Save Changes" button.

Control Panel

Method 4. Using Network Connections

Step 1. Open Control Panel.

Step 2. Click on the "View network status and tasks" option under the "Network and Internet" section.

Step 3. On the left side, click on "Change adapter settings".

Step 4. Now, select the network device, right-click on it, and click on the "Properties" option.

Properties

Step 5. Now, select (check) the "File and Printer Sharing for Microsoft Networks" option and click on the "OK" button.

File and Printer Sharing for Microsoft Networks

Note. If the users want to turn on (enable) the file and printer sharing option, then they also should have to enable (turn on) the "File and Printer Sharing for Microsoft Networks" option.

Conclusion

By following any of the above methods, you can enable or disable the file and printer sharing option in Windows 10.

I hope you enjoyed this article. Follow C# Corner to learn more new and amazing things about Windows 10.

Thanks for reading.


Similar Articles