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

ใช้งาน Windows Defender Antivirus บน Windows Server 2016/2019

Windows Defender Antivirus (เรียกว่า Microsoft Defender ตั้งแต่ Win10 2004) ติดตั้งมาพร้อม Windows Server 2016/2019 ฟรี ไม่ต้องซื้อเพิ่ม

1. เปิดใช้งาน GUI

Server 2016: Server Manager → Add Features → Windows Defender Features → GUI for Windows Defender
PowerShell: Install-WindowsFeature -Name Windows-Defender-GUI
Server 2019: GUI อยู่ใน App "Windows Security" (Settings → Update & Security) หากเปิดไม่ได้ รัน: Add-AppxPackage -Register -DisableDevelopmentMode "C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppXManifest.xml"

2. ถอนการติดตั้ง (ถ้ามี AV อื่น)

PowerShell: Uninstall-WindowsFeature -Name Windows-Defender (อย่าถอนถ้าไม่มี AV อื่น)
ติดตั้งกลับ: Add-WindowsFeature Windows-Defender-Features,Windows-Defender-GUI

3. จัดการด้วย PowerShell

  • สถานะ Service: Get-Service WinDefend
  • รายละเอียด: Get-MpComputerStatus (เวอร์ชัน Signature, Last Scan, ฯลฯ)
  • ปิด Real-time: Set-MpPreference -DisableRealtimeMonitoring $true
  • เปิด Real-time: Set-MpPreference -DisableRealtimeMonitoring $false
  • สแกน USB: Set-MpPreference -DisableRemovableDriveScanning $false
  • Cmdlet ทั้งหมด: Get-Command -Module Defender

4. เพิ่ม Exception (Exclusions)

Server มี Auto-exclusions ตาม Role (เช่น Hyper-V: .vhd, .vhdx, VM processes)
ปิด Auto: Set-MpPreference -DisableAutoExclusions $true
เพิ่ม Path เอง: Set-MpPreference -ExclusionPath "C:\ISO", "C:\VM"
เพิ่ม Process: Set-MpPreference -ExclusionProcess "vmms.exe", "Vmwp.exe"

5. รายงานสถานะจาก Remote Computer

PowerShell Script ใช้ Invoke-Command + Get-MpComputerStatus / Get-MpThreatDetection ผ่าน WinRM ดึงข้อมูลจาก AD Servers ทั้งหมด

6. อัปเดต Definitions

  • Auto จาก Windows Update หรือ WSUS (อนุมัติ "Definition Updates" ใน WSUS)
  • Reset Definitions: MPCMDRUN.exe -RemoveDefinitions -All → MPCMDRUN.exe –SignatureUpdate
  • Offline: ดาวน์โหลดจาก Microsoft → วาง Network Share → Set-MpPreference -SignatureDefinitionUpdateFileSharesSources \\server\share → Update-MpSignature -UpdateSource FileShares

7. จัดการด้วย Group Policy

Computer Config → Admin Templates → Windows Components → Windows Defender Antivirus (100+ Settings)
ปิด Defender: Enable "Turn off Windows Defender Antivirus"
Central Management: Azure Security Center (ATP) ค่าใช้จ่าย ~$15/host/เดือน