How to enable / disable File and Printer Sharing in Windows 10

How to enable / disable File and Printer Sharing in Windows 10

File and Printer Sharing is the ability of a Windows-based computer to share a folder or printer attached to other computers on the network.

If you are connecting to a public network (for example, a coffee shop or a library), you can disable the File and Printer Sharing feature until connected to a private network location (for example, home private or agency).

This guide will show you how to enable or disable File and Printer Sharing on your Windows 10 PC.

Note:

– You must be logged in as admin to be able to enable or disable File and Printer Sharing.

If your networked computers are not visible in File Explorer, make sure the Function Discovery Provider Host and Function Discovery Resource Publication services are enabled, set to Automatic, and running.

Enable / disable File and Printer Sharing in Network and Sharing Center

1. Open Control Panel (icon view) and click the Network and Sharing Center icon.

2. Click the Change advanced sharing settings link on the left side.

Click the link Change advanced sharing settings

3. Expand the Private or Guest or Public network profile for the profile for which you want to enable or disable File and Printer Sharing.

4. Select Turn on file and printer sharing or Turn off file and printer sharing depending on what you want to do and click Save changes.

5. When done, you can close the Network and Sharing Center if desired.

6. If you have file and printer sharing enabled, then you will also need to enable File and Printer Sharing for Microsoft Networks using option 4 below.

Enable / disable File and Printer Sharing for all network profiles in Command Prompt

1. Open Command Prompt as administrator.

2 Do step 3 (on) or step 4 (off) below, depending on what you want to do.

3. To enable File and Printer Sharing for all network profiles, copy and paste below command into Command Prompt, press Enter, and go to step 5 below.

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

4. To turn off File and Printer Sharing for all network profiles, copy and paste below command into Command Prompt, press Enter and go to step 5 below.

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

5. Now, you can Command Prompt if you want.

6. If you have file and printer sharing enabled, then you will also need to enable File and Printer Sharing for Microsoft Networks using option 4 below.

Enable / disable File and Printer Sharing in PowerShell

1. Open PowerShell as admin.

2 Do step 3 (on) or step 4 (off) depending on what you want to do.

3. To turn on File and Printer Sharing, copy and paste the below command that you want to use into PowerShell, press Enter and go to step 5 below.

(Applies to all network profiles)

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

Or;

(Applies to the ” Domain ” network profile)

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

Or:

(Applies to ” Private ” network profile)

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

Or:

(Applies to network profile ” Public “)

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

4. To turn off File and Printer Sharing, copy and paste the command below into PowerShell, press Enter and go to step 5 below.

(Applies to all network profiles)

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

Or:

(Applies to the ” Domain ” network profile)

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

Or;

(Applies to ” Private ” network profile)

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

Or:

(Applies to network profile ” Public “)

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

5. Now, you can close PowerShell if you want.

6. If you have file and printer sharing enabled, then you also need to enable File and Printer Sharing for Microsoft Networks using option 4 below.

Enable / disable File and Printer Sharing for Microsoft Networks in Network Properties

1. Open Control Panel (icon view) and click the Network and Sharing Center icon.

2. Click the Change adapter settings link on the left side.

3. Right-click or press and hold on the network adapter (eg Ethernet 2) you want to enable or disable the File and Printer Sharing for Microsoft Networks feature and click Properties.

Click Properties

4. Select (enable – default) or uncheck (disable) File and Printer Sharing for Microsoft Networks , depending on what you want and click OK.

Check or uncheck File and Printer Sharing for Microsoft Networks

5. If you have turned on the File and Printer Sharing for Microsoft Networks feature, then you also need to enable File and Printer Sharing using options 1, 2, 3 above.

Enable / disable File and Printer Sharing for Microsoft Networks in PowerShell

1. Open PowerShell as admin.

2. Copy and paste the command below into PowerShell, and then press Enter. Note the name of the network adapter (for example, “Ethernet”) for which you want to enable or disable file and printer sharing for the Microsoft network.

Get-NetAdapter | Format-Table -AutoSize

3. Do step 4 (on) or step 5 (off) below depending on what you want to do.

4. To enable File and Printer Sharing for Microsoft Networks, enter one of the two commands below into PowerShell, press Enter, and go to step 6.

Enable-NetAdapterBinding -Name "<Network Adapter Name>" -ComponentID ms_server

Or:

Enable-NetAdapterBinding -Name "<Network Adapter Name>" -DisplayName "File and Printer Sharing for Microsoft Networks"

Replace <Network Adapter Name> in the above command with the actual network adapter name (eg “Ethernet”) from step 2 for which you want to enable File and Printer Sharing for Microsoft Networks.

For example:

Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_server

5. To turn off File and Printer Sharing for Microsoft Networks, enter one of the two commands below into PowerShell, press Enter, and go to step 6.

Disable-NetAdapterBinding -Name "<Network Adapter Name>" -ComponentID ms_server

Or:

Disable-NetAdapterBinding -Name "<Network Adapter Name>" -DisplayName "File and Printer Sharing for Microsoft Networks"

Replace <Network Adapter Name> in the above command with the actual network adapter name (eg “Ethernet”) from step 2 for which you want to disable the File and Printer Sharing for Microsoft Networks feature.

For example:

Disable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_server

6. If you have enabled the File and Printer Sharing for Microsoft Networks feature, then you also need to enable File and Printer Sharing using options 1, 2, 3 above.

See more:

  • How to enable / disable Bluetooth Absolute Volume in Windows 10