簡體   English   中英

(如何)我可以在 docker 容器中運行 Windows Defender 嗎? 得到錯誤

[英](How) Can I run Windows Defender in a docker container? Getting errors

我正在為 Windows 環境的端點筆測試實驗室試驗一些選項,而 Docker 似乎是一個非常輕量級且易於配置的選項。 但是,在此設置中測試 Windows Defender 時,我遇到了錯誤,我在上面找到的每個幫助線程答案都導致了更多錯誤。 在 docker 容器中運行 Windows Defender 不可行嗎?

我試過的:

運行 docker Windows 容器:

PS C:\WINDOWS\system32> docker run mcr.microsoft.com/windows:20H2
Unable to find image 'mcr.microsoft.com/windows:20H2' locally
20H2: Pulling from windows
f26dc4584b4d: Pull complete
881882374a3c: Pull complete
Digest: sha256:bfcfdafc3db9b35528635acfdbc07169ed0a6b8af88feb7b6e1da62cd4f3b748
Status: Downloaded newer image for mcr.microsoft.com/windows:20H2
Microsoft Windows [Version 10.0.19042.1348]
(c) Microsoft Corporation. All rights reserved.

C:\>

然后在該容器 CLI 中,運行:

PS C:\> (Get-Service windefend).Status
Stopped

PS C:\> Start-Service windefend
Start-Service : Service 'Microsoft Defender Antivirus Service (windefend)'
on computer '.'.
At line:1 char:1
+ Start-Service windefend
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceControl
   ler:ServiceController) [Start-Service], ServiceCommandException
    + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Comman
   ds.StartServiceCommand

PS C:\> Get-MpComputerStatus
Get-MpComputerStatus : A general error occurred that is not covered by a more
specific error code.
At line:1 char:1
+ Get-MpComputerStatus
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_MpComputerStatus:ROOT\Micros
   oft\...pComputerStatus) [Get-MpComputerStatus], CimException
    + FullyQualifiedErrorId : HRESULT 0x800106ba,Get-MpComputerStatus

在我看來,這些錯誤消息沒有幫助。 我不知道CategoryInfo: NotSpecified: (MSFT_MpComputerStatus:ROOT\Microsoft\...pComputerStatus) [Get-MpComputerStatus], CimException是什么意思,也不FullyQualifiedErrorId: HRESULT 0x800106ba,Get-MpComputerStatus ,它似乎沒有暗示任何無法啟動服務的原因。 因此,我想知道這是否不可能。

我在同一條船上,你知道如何啟用它嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM