将Azure反恶意软件扩展安装到现有虚拟机

时间:2014-12-31 15:46:08

标签: azure virtual-machine

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

重现问题的步骤:

使用Visual Studio

1)从VS

连接到Azure

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

3)打开配置属性。

4)从扩展程序中选择Microsoft Antimalware,然后单击“添加”。

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

  
    

更新虚拟机myVM ...

         

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

  

使用PowerShell

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

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

2 个答案:

答案 0 :(得分:1)

通过powershell安装反恶意软件:

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

 Get-Module

现在以json格式在磁盘上创建配置文件:

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

然后选择并更新您的VM:

 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

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

您现在可以从开始菜单启动系统中心端点保护,并以通常的方式配置程序。

答案 1 :(得分:1)

我迟到了,所以你可能已经解决了这个问题。

这就是我使用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
  • 您可以通过查看针对Microsoft反恶意软件服务的services.msc来检查它是否有效