【问题标题】:Installing Azure Antimalware Extension to an existing Virtual Machine将 Azure 反恶意软件扩展安装到现有虚拟机
【发布时间】:2014-12-31 15:46:07
【问题描述】:

我正在尝试将 Microsoft Antimalware 扩展安装到现有虚拟机。

重现问题的步骤:

使用 Visual Studio

1) 从 VS 连接到 Azure

2) 从虚拟机中选择服务器

3) 打开配置属性。

4) 从扩展中选择 Microsoft Antimalware 并单击添加。

5) 单击更新。输出...

正在更新虚拟机 myVM...

无法更新虚拟机。端点组 HTTP-80 的探测设置为空。外部端点 HTTP 无法指定探测设置。

使用 PowerShell

当按照这些MS instructions 使用 Powershell 安装反恶意软件时,我收到错误:

PS C:\> Update-AzureVM -Name $service -ServiceName $name -VM $vm.VM

Update-AzureVM : Could not find a deployment for 'myVM' in 'Production' slot.
At line:1 char:1
+ Update-AzureVM -Name $service -ServiceName $name -VM $vm.VM
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Update-AzureVM], ApplicationException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.UpdateAzureVMCommand

【问题讨论】:

    标签: azure virtual-machine


    【解决方案1】:

    通过 powershell 安装反恶意软件:

    确保您使用的是最新的 Azure Powershell 版本(0.8.12 版)

     Get-Module
    

    现在在磁盘上创建一个json格式的配置文件:

     $JsonString="{ 'AntimalwareEnabled': true }"
     $JsonString |Out-File $home\downloads\AzureAntimalware.json
    

    然后选择并更新您的虚拟机:

     Get-AzureVM -Servicename "myService" -Name "myVM" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile $home\downloads\AzureAntimalware.json | Update-AzureVM
    

    这会将 System Center Endpoint Protection 安装到虚拟机上。

    当您尝试从开始菜单启动 System Center Endpoint Protection 时,您可能会看到以下错误消息:

     Your system administrator has restricted access to this app.
    

    要解决此问题,请在 VM 上打开命令提示符并输入:

     cd "c:/program files/microsoft security client"
    
     configsecuritypolicy cleanuppolicy.xml
    

    这将创建必要的配置文件并解决问题。

    您现在可以从开始菜单启动 System Center Endpoint Protection 并以通常的方式配置程序。

    【讨论】:

    • 使用 cleanuppolixy.xml 似乎也可以正常工作,但不知道它是否可以在不卸载/安装扩展的情况下轻松恢复?
    【解决方案2】:

    我回复的有点晚了,所以你可能已经解决了这个问题。

    这是我使用 Powershell 解决的方法:

    $vm = Get-AzureVM –serviceName $svc –Name $name $vm.VM.ProvisionGuestAgent = $TRUE Update-AzureVM –Name $name –VM $vm.VM –ServiceName $svc

    • 您可以通过打开任务管理器并单击详细信息选项卡来检查它是否正在运行 - 查找 WaAppAgent.exe、WindowsAzureGuestAgent.exe、WindowsAzureTelemetryService.exe
    • 运行后,您可以使用以下内容安装 AntiMalware:
        $servicename = "<SERVICE NAME HERE>"
        $name = "<NAME HERE>"
    
        # Get the VM
        $vm = Get-AzureVM –ServiceName $servicename –Name $name
    
        # Add Microsoft Antimalware Agent to the Virtual Machine
        Set-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.* -VM $vm.VM
    
        # Update the VM which will install the Antimalware Agent
        Update-AzureVM -Name $servicename -ServiceName $name -VM $vm.VM
    
    • 您可以通过在 services.msc 中查看 Microsoft Antimalware 服务来检查它是否有效

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-19
      • 2013-12-15
      • 1970-01-01
      • 2015-09-04
      • 2020-03-30
      • 2021-07-11
      • 2022-01-18
      相关资源
      最近更新 更多