File and Printer Sharing cho phép chia sẻ file và máy in qua mạng. Nên tắt khi dùng mạng công cộng để bảo mật. Dưới đây là 3 cách bật/tắt trên Windows 11/10.
Điều kiện tiên quyết
Đảm bảo File and Printer Sharing for Microsoft Networks đã bật trong Network Adapter Properties:
- Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings.
- Chuột phải adapter > Properties > tab Networking > tích File and Printer Sharing for Microsoft Networks > OK.
3 phương pháp bật/tắt
1. Qua Control Panel
- Control Panel > Network and Internet > Network and Sharing Center.
- Click Change advanced sharing settings.
- Mục File and printer sharing: tích Turn on file and printer sharing để bật, hoặc Turn off file and printer sharing để tắt.
- Nhấn Save changes.
2. Qua Command Prompt (Admin)
- Bật:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
- Tắt:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=No
3. Qua Windows PowerShell (Admin)
Chạy lệnh Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True/False -Profile [Any|Domain|Private|Public]
Ví dụ bật cho tất cả profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Any
Tắt cho Public profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Public
Đọc thêm: Chia sẻ và thêm máy in mạng, bật/tắt chia sẻ máy in trong Windows Sandbox, khắc phục lỗi chia sẻ file.