Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

วิธีเปิด/ปิด File and Printer Sharing ใน Windows 11/10

Windows 11 เป็นหนึ่งในชุดระบบปฏิบัติการที่พัฒนาโดย Microsoft การแชร์เครือข่ายและการสื่อสารระหว่างระบบหนึ่งกับอีกระบบหนึ่ง เป็นสิ่งสำคัญมากในระบบปฏิบัติการของ Microsoft อยู่เสมอ จากฟีเจอร์แชร์ต่างๆ File and Printer Sharing เป็นที่นิยมในหมู่ผู้ใช้ ฟีเจอร์นี้ File sharing อนุญาตให้แลกเปลี่ยนไฟล์และข้อมูลระหว่างเครือข่าย และ print sharing อนุญาตให้ผู้ใช้ส่งงานพิมพ์จากเครือข่ายหนึ่งไปยังเครื่องพิมพ์ที่ต่อกับอีกเครือข่าย โพสต์นี้จะแนะนำวิธีเปิด/ปิด file and printer sharing ใน Windows 11/10

Microsoft แนะนำให้ปิด file and print sharing features เพื่อปกป้องไฟล์ไม่ให้ถูกแชร์อัตโนมัติผ่านเครือข่ายไร้สาย ฟีเจอร์เหล่านี้ก็จำเป็นและทำให้งานยาวนานง่ายขึ้น โดยให้ระบบเข้าถึงข้อมูลกันและส่งคำสั่ง

เปิด/ปิด File and Printer Sharing ใน Windows 11/10

File sharing ช่วยให้ผู้ใช้อื่นที่เชื่อมต่อผ่าน network sharing บนการเชื่อมต่อเดียวกัน เข้าถึง อ่าน และแก้ไขไฟล์ของอีกฝ่าย Print sharing อนุญาตให้ผู้ใช้บนเครือข่ายเดียวกันส่งงานพิมพ์จากระบบของพวกเขาไปยังเครื่องพิมพ์ของคุณ ผู้ใช้อาจต้องการปิดฟีเจอร์นี้เมื่อเชื่อมต่อเครือข่ายสาธารณะเพื่อความปลอดภัย

วิธีเปิด/ปิด File and Printer Sharing ใน Windows 11/10

ก่อนเปิดฟีเจอร์ ต้องแน่ใจว่า File and Printer Sharing for Microsoft ตัวเลือกเปิดใช้งานในหน้าต่างคุณสมบัติ network adapter

  • เปิด Control Panel ก่อน
  • ตั้ง View by เป็น Category
  • ไป Network and Internet > Network and Sharing Center > Change adapter settings
  • คลิกขวา network adapter ที่ต้องการเปิด/ปิด เลือก Properties จาก context menu
  • บนแท็บ Networking ติ๊กถูกกล่องข้าง File and Printer Sharing for Microsoft Networks
  • คลิก OK ปิดหน้าต่าง

อ่านเพิ่มเติม: วิธีแชร์และเพิ่ม Network Printer

ตอนนี้ต้องเปิด file and printer sharing บนระบบ มี 3 วิธีสำหรับเปิด/ปิด file and printer sharing ใน Windows 10:

  1. ผ่าน Control Panel
  2. ใช้ Command Prompt
  3. ผ่าน Windows PowerShell

มาอธิบายทุกวิธีรายละเอียด:

1] เปิด File and Printer Sharing ผ่าน Control Panel

File and print sharing เข้าถึงและควบคุมได้ง่ายผ่าน control panel ทำตามข้อเสนอด้านล่าง:

  1. เปิด Control Panel
  2. คลิก Network and Internet
  3. เลือก Network and Sharing Center
  4. คลิก Change advanced sharing settings
  5. หากต้องการเปิด ไปส่วน File and printer sharing ติ๊ก Turn on file and printer sharing และติ๊ก Turn off file and printer sharing เพื่อปิด

มาดูขั้นตอนรายละเอียด:

วิธีเปิด/ปิด File and Printer Sharing ใน Windows 11/10

เริ่มด้วยการเปิด Control Panel ก่อน เปิดแล้ว ตรวจสอบ View by ตั้งเป็น Category

ใน Control Panel, ไป Network and Internet

ต่อไป เลือก Network and Sharing Center หน้าต่าง Network and Sharing Center จะมีตัวเลือกหลายอย่าง ต้องเลือก Change advanced sharing settings

หน้าต่าง Advanced Sharing Settings จะปรากฏบนหน้าจอ พร้อม Network discovery และ File and printer sharing options ตามภาพ ภายใต้ File and printer sharing เลือก Turn on file and printer sharing และ Save changes

แม้ตัวเลือกนี้เปิดอยู่แล้วในอุปกรณ์ และตอนนี้ต้องการปิด ให้ติ๊กกล่องข้าง Turn off file and printer sharing แล้วคลิก Save changes 套用การตั้งค่า

อ่านเพิ่มเติม: File Sharing ไม่ทำงานใน Windows

2] เปิด File and Printer Sharing ด้วย Command Prompt

File and printer sharing สามารถเปิด/ปิดด้วย command prompt เปิด Command Prompt เป็น administrator ก่อน

ใน Command Prompt ที่ได้สิทธิ์สูง พิมพ์โค้ดต่อไปนี้ กด Enter เพื่อเปิดบริการ file and printer sharing สำหรับทุก network profiles:

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

หากต้องการปิด file and printer sharing คัดลอกวางคำสั่งนี้ กด Enter:

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

พร้อมแล้ว ตรวจสอบว่าทำได้หรือไม่

อ่านเพิ่มเติม: เปิด/ปิด Printer Sharing ใน Windows Sandbox

3] เปิด/ปิด File and Printer Sharing ผ่าน PowerShell

สามารถใช้ Windows PowerShell เปิด/ปิด file and printer sharing features

เปิด elevated PowerShell prompt ก่อน

คัดลอกวางบรรทัดคำสั่งด้านล่าง กด Enter รัน สามารถรันคำสั่งเฉพาะสำหรับ network profiles ที่เกี่ยวข้อง:

  • สำหรับทุก network profiles:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Any
  • สำหรับ Domain network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Domain
  • สำหรับ Private network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Private
  • สำหรับ Public network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Public

เช่นกัน หากต้องการปิดฟีเจอร์นี้ รันคำสั่งเฉพาะสำหรับ profile ที่เกี่ยวข้อง:

  • สำหรับทุก network profiles:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Any
  • สำหรับ Domain network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Domain
  • สำหรับ Private network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Private
  • สำหรับ Public network profile:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Public

หลังรันคำสั่ง ปิดหน้าต่าง PowerShell

แค่นี้ก็จบ หวังว่าช่วยได้

อ่านเพิ่มเติม: File and Print sharing resource is online but isn't responding to connection attempts

วิธีเปิด/ปิด File and Printer Sharing ใน Windows 11/10