Windows 10 has an option from Control Panel for turning on or off file and printer sharing on a network. With file and printer sharing turned on, you’re allowing other users on your network access to the files and printers that you chose to share.

The following tutorial demonstrates how to turn on and off file and printer sharing when you’re using a version of the Windows 10 operating system.

Method One: How to Turn On/Off File and Printer Sharing in Network and Sharing Center

Here is how you can turn on or off the file and printer sharing in the Network and Sharing Center from Control Panel:

1. Open Control Panel and have it showing the icons view.

2. From the list of All Control Panel Items, click on the Network and Sharing Center icon.

3. Click on the Change advanced sharing settings link in the left menu. (click to enlarge screenshot below)

4. Next to Private, click on the expand arrow.

5. Under the File and printer sharing heading, choose to either Turn on file and printer sharing or Turn off file and printer sharing. (click to enlarge screenshot below)

6. Expand Guest or Public this time and choose to either Turn on file and printer sharing or Turn off file and printer sharing.

Note: The settings that are relevant to the account you’re using are shown as “(current profile)” next to the Private and Guest or Public headings that you expand. In the example below, it is the Guest or Public settings that are for the current profile that we are signed in with. (click to enlarge screenshot below)

Method Two: How to Turn On/Off File and Printer Sharing for Microsoft Networks

Here is how you can turn on or off the file and printer sharing for Microsoft networks from the Network and Sharing Center in the Control Panel:

1. Open the Control Panel so that it is showing in its icons view by clicking on small icons or large icons from the View by: menu in the top right corner.

2. Click on Change adapter settings link from the left menu. (click to enlarge screenshot below)

3. Right-click on the network adapter associated with the file and printer sharing over a network that you want to change, and then click Properties. (click to enlarge screenshot below)

4. From the Wi-Fi Properties dialog, check or uncheck the box next to where it says File and Printer Sharing for Microsoft Networks.

You can now close the Wi-Fi Properties dialog.

Method Three: How to Turn On/Off File and Printer Sharing in Windows PowerShell

Here is how you can turn on or off the file and printer sharing by using the Windows PowerShell:

1. Open the elevated Windows PowerShell window.

2. To Turn On File and Printer Sharing

a. Type one of the following commands into the command line and then press the “Enter” key on your keyboard to execute it:

Apply to all network profiles:

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

or

Apply to “Domain” network profile:

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

or

Apply to “Private” network profile:

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

or

Apply to “Public” network profile:

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

3. To Turn Off File and Printer Sharing

a. Type one of the following commands into the command line and then press the “Enter” key on your keyboard to execute it:

Apply to all network profiles:

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

or

Apply to “Domain” network profile:

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

or

Apply to “Private” network profile:

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

or

Apply to “Public” network profile:

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

You can now close the elevated Windows PowerShell window.

Method Four: How to Turn On or Off File and Printer Sharing for All Network Profiles in Command Prompt

1. Open the elevated Command Prompt window.

2. To Turn On File and Printer Sharing for All Network Profiles

a. Type the following command into the command line and then press the “Enter key on your keyboard to execute it:

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

3. To Turn Off File and Printer Sharing for All Network Profiles

a. Type the following command into the command line and then press the “Enter key on your keyboard to execute it:

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

You can now close the Command Prompt window.