To enable file and printer sharing in Windows Defender Firewall, open the Windows Defender Firewall Control Panel applet. Click Show All Settings. Under Computers and devices, click on your computer name. Then under Security settings, select Windows Defender Firewall from the list of options. In the left panel, under Protect you computer with: select Allow an app or feature through Windows Defender Firewall. Now select the trust center where you want to allow printing accessed by an app or feature. Select File and Printer Sharing (Sharing files and printers) then press OK. In the right panel tick all three check boxes for Print, Block access to this shared resource while not connected to the Internet and Enable anonymous usage which will allow locally stored files to be printed without user intervention . You can also add a new App Block for file sharing by clicking on Add an app block . Now close the window by pressing OK then Exit.