Microsoft Defender 核心服務概觀

Microsoft Defender Core 服務

為了增強您的端點安全性體驗,Microsoft 會發行 Microsoft Defender Core 服務,以協助 Microsoft Defender 防病毒軟體的穩定性和效能。

必要條件

  1. Microsoft Defender Core 服務隨 Microsoft Defender 防病毒軟體平臺 4.18.23110.2009 版發行。

  2. 首度發行開始於:

    • 2023年11月發行前版本客戶。
    • 2024 年 4 月中對執行 Windows 用戶端的企業客戶。
    • 2024 年 6 月中,美國政府客戶執行 Windows 用戶端。
  3. 如果您使用 適用於端點的 Microsoft Defender 簡化的裝置連線體驗,則不需要新增任何其他 URL。

  4. 如果您使用 適用於端點的 Microsoft Defender 標準裝置連線體驗:

    企業客戶應該允許下列 URL:

    • *.endpoint.security.microsoft.com
    • ecs.office.com/config/v1/MicrosoftWindowsDefenderClient
    • *.events.data.microsoft.com

    如果您不想要使用 的通配符 *.events.data.microsoft.com,您可以使用:

    • us-mobile.events.data.microsoft.com/OneCollector/1.0
    • eu-mobile.events.data.microsoft.com/OneCollector/1.0
    • uk-mobile.events.data.microsoft.com/OneCollector/1.0
    • au-mobile.events.data.microsoft.com/OneCollector/1.0
    • mobile.events.data.microsoft.com/OneCollector/1.0

    企業美國政府客戶應允許下列 URL:

    • *.events.data.microsoft.com
    • *.endpoint.security.microsoft.us (GCC-H & DoD)
    • *.gccmod.ecs.office.com (GCC-M)
    • *.config.ecs.gov.teams.microsoft.us (GCC-H)
    • *.config.ecs.dod.teams.microsoft.us (DoD)
  5. 如果您使用 適用於 Windows 的應用程控,或執行非 Microsoft 防病毒軟體或端點偵測和回應軟體,請務必將稍早提到的程式新增至允許清單。

  6. 取用者不需要採取任何動作即可準備。

Microsoft Defender 防病毒程序和服務

下表摘要說明在 Windows 裝置上使用任務管理員 () 檢視 Microsoft Defender 防病毒軟體程式和服務MdCoreSvc的位置。

進程或服務 檢視其狀態的位置
Antimalware Core Service [行程] 索引 標籤
MpDefenderCoreService.exe 詳細數據索 引標籤
Microsoft Defender Core Service [服務] 索引 標籤

若要深入瞭解 Microsoft Defender Core 服務設定和測試 (ECS) ,請參閱 Microsoft Defender Core 服務設定和實驗

常見問題 (常見問題) :

Microsoft Defender Core 服務的建議為何?

強烈建議您讓 Microsoft Defender Core 服務的預設設定保持執行和報告。

Microsoft Defender Core 服務遵守哪些資料記憶體和隱私權?

檢閱 適用於端點的 Microsoft Defender 數據儲存和隱私權

是否可以強制執行 Microsoft Defender Core 服務仍以系統管理員身分執行?

您可以使用下列任一管理工具來強制執行:

  • Configuration Manager 共同管理
  • 群組原則
  • PowerShell
  • 登錄

使用 Configuration Manager 共同管理 (ConfigMgr,先前稱為 MEMCM/SCCM) 來更新 Microsoft Defender Core 服務的原則

Microsoft Configuration Manager 已整合執行 PowerShell 腳本,以在網路中的所有電腦上更新 Microsoft Defender 防病毒軟體原則設定。

  1. 開啟 Microsoft Configuration Manager 主控台。
  2. 選取 [軟體連結庫>腳本 > Create 腳本]
  3. 輸入文本名稱,例如 Microsoft Defender Core 服務強制執行和描述,例如示範組態以啟用 Microsoft Defender 核心服務設定。
  4. [語言 ] 設定為 [PowerShell],並將 [逾時] 秒 設定為 180
  5. 貼上下列「Microsoft Defender 核心服務強制執行」腳本範例,以作為範本使用:
######
#ConfigMgr Management of Microsoft Defender Core service enforcement
#"Microsoft Defender Core service is a new service to help keep the reliability and performance of Microsoft Defender Antivirus.
#Check Log File for enforcement status - C:\Windows\temp\ConfigDefenderCoreService-<TimeStamp>.log
######
Function Set-RegistryKeyValue{
param (
$KeyPath,
$ValueName,
$Value,
$PropertyType,
$LogFile
)
Try {
    If (!(Test-path $KeyPath)) {
    $Path = ($KeyPath.Split(':'))[1].TrimStart("\")
    ([Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine,$env:COMPUTERNAME)).CreateSubKey($Path)
    New-ItemProperty -path $KeyPath -name $ValueName -value $Value -PropertyType $PropertyType -Force | Out-Null
    }
    Else {
    New-ItemProperty -path $KeyPath -name $ValueName -value $Value -PropertyType $PropertyType -Force | Out-Null
    }
    $TestValue = (Get-ItemProperty -Path $KeyPath)."$ValueName"
    If ($TestValue -eq $Value){ Add-Content -Path $LogFile -Value "$KeyPath,$ValueName,$Value,$PropertyType,$TestValue,Success" }
    Else { Add-Content -Path $LogFile -Value "$KeyPath,$ValueName,$Value,$PropertyType,$TestValue,Failure" }
    }
    Catch {
    $ExceptionMessage = $($PSItem.ToString()) -replace [Environment]::NewLine,"";
    Add-Content -Path $LogFile -Value "$KeyPath,$ValueName,$Value,$PropertyType,$TestValue,Failure - $ExceptionMessage"
    }
}
$ExecutionTime = Get-Date
$StartTime = Get-Date $ExecutionTime -Format yyyyMMdd-HHmmss
$LogFile = "C:\Windows\temp\ConfigDevDrive-$StartTime.log"
Add-Content -Path $LogFile -Value "------------------------------------V 1.0 

$ExecutionTime - Execution Starts -------------------------------------------"
Add-Content -Path $LogFile -Value "RegistryKeyPath,ValueName,ExpectedValue,PropertyType,CurrentValue,ComparisonResult"
#Set up Microsoft Defender Core service
Set-RegistryKeyValue -KeyPath "HKLM:\Software\Policies\Microsoft\Windows Defender\Features\" -ValueName "DisableCoreService1DSTelemetry" -Value "0" -PropertyType "Dword" -LogFile $LogFile
Set-RegistryKeyValue -KeyPath "HKLM:\Software\Policies\Microsoft\Windows Defender\Features\" -ValueName "DisableCoreServiceECSIntegration" -Value "0" -PropertyType "Dword" -LogFile $LogFile
$ExecutionTime = Get-Date
Add-Content -Path $LogFile -Value "------------------------------------ 
$ExecutionTime - Execution Ends -------------------------------------------"

新增文稿時,您必須選取並核准它。 核准狀態會從 [等候核准] 變更為 [ 已核准]。 核准之後,以滑鼠右鍵按兩下單一裝置或裝置集合,然後選取[ 執行腳本]

在 [執行腳本精靈] 的腳本頁面上,從範例) 中 (Microsoft Defender Core 服務強制執行清單中選擇您的腳本。 只會顯示核准的腳本。 選取 [下一步] 並完成精靈。

使用 群組原則 編輯器 來更新 Microsoft Defender Core 服務的 群組原則

  1. 這裡下載最新的 Microsoft Defender 群組原則 系統管理範本。

  2. 設定域控制器 中央存放庫

    注意事項

    複製 .admx,並將 .adml 分別複製到 En-US 資料夾。

  3. Start、GPMC.msc (例如域控制器或 ) 或 GPEdit.msc

  4. 移至電腦設定 ->系統管理範本 ->Windows 元件 ->Microsoft Defender 防病毒軟體

  5. 針對 Defender 核心服務開啟測試和設定服務 (ECS) 整合

    • 未設定或啟用 (預設) :Microsoft Defender 核心服務會使用ECS快速提供 Microsoft Defender防病毒軟體和其他Defender軟體的重要組織特定修正。
    • 已停用:Microsoft Defender 核心服務將停止使用ECS快速提供 Microsoft Defender 防病毒軟體和其他Defender軟體的重要組織特定修正。 針對誤判,修正程式會透過「安全情報更新」傳遞,而針對平臺和/或引擎更新,修正程式會透過 Microsoft Update、Microsoft Update Catalog 或 WSUS 傳遞。
  6. 開啟 Defender 核心服務的遙測

    • 未設定或啟用預設 () :Microsoft Defender Core 服務會從 Microsoft Defender 防病毒軟體和其他 Defender 軟體收集遙測數據
    • 已停用:Microsoft Defender Core 服務會停止從 Microsoft Defender 防病毒軟體和其他Defender軟體收集遙測。 停用此設定可能會影響 Microsoft 快速辨識和解決問題的能力,例如效能緩慢和誤判。

使用 PowerShell 更新 Microsoft Defender Core 服務的原則。

  1. 移至 [開始],並以系統管理員身分執行 PowerShell。

  2. 使用 $true Set-MpPreferences -DisableCoreServiceECSIntegration 或 $false 命令,其中 $false = enabled 和 $true = disabled。 例如:

    Set-MpPreferences -DisableCoreServiceECSIntegration $false 
    
  3. 使用 $true Set-MpPreferences -DisableCoreServiceTelemetry 或 $false 命令,例如:

    Set-MpPreferences -DisableCoreServiceTelemetry $true
    

使用登錄來更新 Microsoft Defender Core 服務的原則。

  1. 取 [開始],然後以系統管理員身分開啟 Regedit.exe。

  2. 請移至 HKLM\Software\Policies\Microsoft\Windows Defender\Features

  3. 設定值:

    DisableCoreService1DSTelemetry (dword) 0 (十六進位)
    0 = 未設定、已啟用 (預設)
    1 = 已停用

    DisableCoreServiceECSIntegration (dword) 0 (十六進位)
    0 = 未設定、已啟用 (預設)
    1 = 已停用