Windows 11 is one of the series of operating systems developed by Microsoft. Network sharing and communication of one system with another has always been an element of great priority in Microsoft operating systems. Out of various sharing features, File and Printer Sharing is quite popular among the users. In this feature, file sharing allows the exchange of files and data between networks, and print sharing allows one user to send print jobs from one network to the other network’s attached printer. This post will guide you on how to turn on or off file and printer sharing in Windows 11/10.
It is always recommended by Microsoft to turn off file and print sharing features to protect the files from getting shared automatically through the wireless network. These features are also essential and make lengthy tasks easy but allowing the systems to access each other’s data and send commands.
Turn On or Off File and Printer Sharing in Windows 11/10
File sharing helps the other user connected through network sharing on the same connection to access, read and edit the files of the other user. Print sharing allows the users connected on the same network to send print jobs from their system to your printer. Users may also wish to turn off this feature when connected to public networks for security purposes.
Before you turn the feature On, make sure the File and Printer Sharing for Microsoft option is enabled in the Networks adapter properties window.
- To do so, open the Control Panel window first.
- Set the View by as Category
- Then go to Network and Internet > Network and Sharing Center > Change adapter settings.
- Right-click on your network adapter which you want to enable or disable and then select the Properties option from the context menu.
- On the Networking tab, check the box next to the File and Printer Sharing for Microsoft Networks option.
- Then click on the OK button and close the window.
Read: How to share and add Network Printer.
Now you will need to turn on the file and printer sharing on your system. There are three methods that you can use for turning on and off file and printer sharing in Windows 10:
- Through the Control Panel.
- Using the Command Prompt.
- Via the Windows PowerShell.
Let’s now explain all the methods in detail:
1] Enable File and Printer Sharing through Control Panel
The file and print sharing can be easily accessed and control through the control panel. Follow the below suggestions to continue:
- Open the Control Panel.
- Click Network and Internet.
- Select Network and Sharing Center.
- Then click on the Change advanced sharing settings option.
- If you want to enable this option, go to the File and printer sharing section and check the Turn on file and printer sharing box. And check the Turn off file and printer sharing box to disable the option.
Let’s now see the above steps in details:
To get it started, open the Control Panel first. Once it opens, make sure that View by is set as Category.
Now inside the Control Panel, go to Network and Internet.
Further, choose Network and Sharing Center. The Network and Sharing Center window will have several options out of which you have to select Change advanced sharing settings.
The Advanced Sharing Settings window will appear on your screen with Network discovery and File and printer sharing options as shown in the above image. Under the File and printer sharing select Turn on file and printer sharing and Save changes.
Although if this option is already enabled in your device and now you are looking to turn it off then simply check the box next to the Turn off file and printer sharing option. Then click on the Save changes button to apply the settings.
Read: File Sharing is not working in Windows.
2] Turn On File and Printer Sharing using Command Prompt
The file and printer sharing can also be enabled or disabled using the command prompt. To do so, run Command Prompt as an administrator first.
Inside the elevated Command Prompt window, type the following text code and press the Enter key to enable the file and printer sharing service for all network profiles:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
If you want to disable the file and printer sharing, copy and paste the following command and then hit the Enter key:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=No
Now you are ready to go. Check if it is done.
Read: Enable or disable Printer Sharing in Windows Sandbox.
3] Enable or Disable File and Printer Sharing via PowerShell
You can also use your Windows PowerShell application to turn on or off file and printer sharing features.
To do this, open an elevated PowerShell prompt first.
Now copy and paste the below command line and then hit Enter to execute it. You can run the particular command line for the relevant network profiles:
- For all the network profiles:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Any
- For the Domain network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Domain
- For the Private network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Private
- For the Public network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Public
Similarly, if you want to turn this feature off, then run the specific command for the relevant profile:
- For all the network profiles:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Any
- For the Domain network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Domain
- For the Private network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Private
- For the Public network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Public
After running the command, now close the PowerShell window.
That’s it. Hope it helps.
Read: File and Print sharing resource is online but isn’t responding to connection attempts.