简体   繁体   English

(如何)我可以在 docker 容器中运行 Windows Defender 吗? 得到错误

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

I'm experimenting with some options for an endpoint pen-testing lab for a Windows environment, and Docker seems like a pretty light-weight and easily configurable option.我正在为 Windows 环境的端点笔测试实验室试验一些选项,而 Docker 似乎是一个非常轻量级且易于配置的选项。 However, upon testing Windows Defender within this setup I'm faced with errors and every help thread answer I've found on it has just resulted in more errors.但是,在此设置中测试 Windows Defender 时,我遇到了错误,我在上面找到的每个帮助线程答案都导致了更多错误。 Is running Windows Defender in a docker container not doable?在 docker 容器中运行 Windows Defender 不可行吗?

What I've tried:我试过的:

Ran a docker Windows container:运行 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:\>

Then within that container CLI, ran:然后在该容器 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

These error messages, to my eyes, aren't helpful.在我看来,这些错误消息没有帮助。 I have no idea what CategoryInfo: NotSpecified: (MSFT_MpComputerStatus:ROOT\Microsoft\...pComputerStatus) [Get-MpComputerStatus], CimException means, nor FullyQualifiedErrorId: HRESULT 0x800106ba,Get-MpComputerStatus , and it doesn't seem to allude to any reason why it can't start the service.我不知道CategoryInfo: NotSpecified: (MSFT_MpComputerStatus:ROOT\Microsoft\...pComputerStatus) [Get-MpComputerStatus], CimException是什么意思,也不FullyQualifiedErrorId: HRESULT 0x800106ba,Get-MpComputerStatus ,它似乎没有暗示任何无法启动服务的原因。 Hence, I'm wondering if it's just not possible.因此,我想知道这是否不可能。

I am in the same boat, did you find out how to enable it?我在同一条船上,你知道如何启用它吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 osx 上运行 docker windows 容器? - How can I run a docker windows container on osx? 当我运行 Windows 容器时,如何为 Docker for Windows 使用的 Windows VM 分配更多内存? - How can I allocate more memory to the Windows VM that Docker for Windows is using when I run a Windows container? 在Azure上,我可以在ASE中运行Windows Docker容器吗? - On Azure, can I run a Windows Docker container in an ASE? 如何在不进入容器的情况下运行docker容器 - How can I run docker container without entering into container 如何运行可以访问 LAN 的 Docker 容器? - How can I run a Docker container that can reach LAN? 尝试在Windows 10主机上的Docker容器内运行Maven时出错 - Errors trying to run Maven inside a Docker container on a Windows 10 host 在Windows Docker容器Windows Server 2016中运行时的Windows Defender /更新问题 - Windows Defender/Update issues when running inside Windows Docker Container Windows Server 2016 如何在 linux 主机上运行 windows docker 容器? - How to run a windows docker container on linux host? 如何在 Docker 中使用 process.argv 运行容器? - How can I run container with process.argv in Docker? 如何在localhost上通过默认IP运行docker容器? - How can I run a docker container on localhost over the default IP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM