How do I enable file and printer sharing in firewall?

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.

How do I enable file and printer sharing in firewall?
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:

  • Change network location type (Public or Private) in Windows 10
  • Change network location type with PowerShell in Windows 10

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:
    How do I enable file and printer sharing in firewall?
  3. On the left, click the link Change advanced sharing settings.
    How do I enable file and printer sharing in firewall?
  4. Expand the Private, Guest or Public network profile item to configure network sharing for each type of network.
    How do I enable file and printer sharing in firewall?
  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.

  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.

    How do I enable file and printer sharing in firewall?

  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

How do I enable file and printer sharing in firewall?

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.

How do I enable file and printer sharing in firewall?

How do I enable file and printer sharing in firewall?
How do I enable file and printer sharing in firewall?

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Post navigation

How do I enable file and print services?

Type CMD in the Search bar. Right-click on Command Prompt, and select Run as Administrator. Type netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes, and hit Enter.

How do I allow a file in Windows Firewall?

Add an exclusion to Windows Security.
Select Start , then open Settings . ... .
Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions..
Select Add an exclusion, and then select from files, folders, file types, or process..

How do I enable file and printer sharing in Windows domain controllers?

Double-click "Windows Firewall: Allow file and printer sharing exception," click the "Settings" tab and select "Enabled." Type a star (*) character in the "Allow unsolicited incoming messages" box to enable the setting for all computers or type in the IP addresses for the computers you want it to apply to.

How do I turn on my printer firewall?

Add a firewall rule to allow network printing.
Go to Configuration > Security Manager > Profiles and select the firewall profile..
Click View Settings for the Firewall module, then click Rules..
Click Add > Application Rule..
Enter the name for the printer application rule..