Disable or Enable File and Printer Sharing in Windows 10

Windows 10 allows the user to share his locally connected printers and stored files with other users over the network. Shared files can be accessible for reading and writing to others. Shared printers can be used for printing on the remote computer. Let's see how to configure File and Printer Sharing in Windows 10.


By default, Windows 10 allows file and printer sharing only over a private (home) network. It is disabled when your network type is set to Public.

When you are signing in to your account and the first time your network is operational, Windows 10 asks you which kind of network you are connecting to: Home or Public. In a sidebar prompt, you are asked whether you want to find PCs, devices and content on the network that you just connected to.

windows 10 build 10074 network type If you pick Yes, the OS will configure it as a private network and turn on network discovery. For a Public network, discovery and access will be limited. If you need to access your computer from a remote PC or browse the PCs and devices on your local network, you need to set it to Home (Private). For these network discovery and sharing features to work properly, file and printer sharing must be turned on.

See the following articles:

To enable file and printer sharing in Windows 10, do the following.

  1. Open the classic Control Panel app.
  2. Go to Control Panel\Network and Internet\Network and Sharing Center:
    Network Center Windows 10
  3. On the left, click the link Change advanced sharing settings. Change Advanced Sharing Settings Link
  4. Expand the Private, Guest or Public network profile item to configure network sharing for each type of network.Private Network Profile Expanded
  5. Enable the option Turn on file and printer sharing for the selected profile and you are done.
  6. Repeat this procedure for other network profiles if required.

To disable file and printer sharing, select the option Turn off file and printer sharing on the same page of the Control panel.

Alternatively, you can use the console tool netsh to switch the state of the feature.

Disable or enable File and Printer sharing using netsh

  1. Open an elevated command prompt.
  2. Type or copy-paste the following command:
    netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes

    This will enable the File and Printer Sharing feature for all network profiles.Enable File Printer Sharing Netsh

  3. To disable the File and Printer Sharing feature for all network profiles, execute the following command:
    netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=No

Disable File Printer Sharing Netsh

Tip: If you have enabled File and Printer Sharing, ensure that you also have enabled the option File and Printer Sharing for Microsoft Networks in your network adapter properties. Open the classic Control Panel and check your network adapter properties under Control Panel\Network and Internet\Network Connections. See the screenshot below.

Windows 10 Change Network Adapter Link

Network Adapter Context Menu Network Adapter Properties

That's it.


5 thoughts on “Disable or Enable File and Printer Sharing in Windows 10

  1. Sam

    Your netsh command only works for ALL profiles. If I specify profile=private, it says
    Only the enable parameter can be used to update rules specified by a group.

    I need to turn it on for private networks and off for public networks.

  2. Jonathan Levi

    Like all the other options this f[censored] didn’t work.

    1. Sergey Tkachenko Post author

      what exactly didn’t work you? could you explain further please.

  3. Tahir Abbas

    I have to disable and then enable the “file and printer sharing for Microsoft Networks” from network setting to make the sharing work.
    When i reboot i need to repeat the steps again to make this working.

  4. Henry Jacobs

    How do you enable or disable sharing for a specific adapter?


Leave a Reply

Your email address will not be published. Required fields are marked *