本文仅演示通过 PowerShell 方式安装并配置 AntiMalware 的过程。

经典虚拟机          立即访问http://market.azure.cn

  • 加载 Antimalware 扩展 :

    复制
    $vm = Get-AzureVM -ServiceName yourservicename -Name yourvmname
    Set-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.3 -VM $vm.VM |Update-AzureVM

    此时虚拟机已经安装过 Antimalware 扩展,官方推荐使用配置文件的方式进行配置(更多的配置定义请参考后续的“配置字段说明”)

  • 配置样例 :

    Json:

    复制
    {
    "AntimalwareEnabled": true,
    "RealtimeProtectionEnabled": true,
    "ScheduledScanSettings": {
    "isEnabled": true,
    "day": 7,
    "time": 120,
    "scanType": "Quick"
    },
    "Exclusions": {
    "Extensions": ".ext1;.ext2",
    "Paths": "c:\\excluded-path-1;c:\\excluded-path-2",
    "Processes": "excludedproc1.exe;excludedproc2.exe"
    }
    }

    XML:

    复制
    <AntimalwareConfig>
    <AntimalwareEnabled>true</AntimalwareEnabled>
    <RealtimeProtectionEnabled>true</RealtimeProtectionEnabled>
    <ScheduledScanSettings isEnabled="true" day="7" time="120" scanType="Quick"/>
    <Exclusions>
    <Extensions>
    <Extension>.ext1</Extension>
    <Extension>.ext2</Extension>
    </Extensions>
    <Paths>
    <Path>c:\excluded-path-1</Path>
    <Path>c:\excluded-path-2</Path>
    </Paths>
    <Processes>
    <Process>excludedproc1.exe</Process>
    <Process>excludedproc2.exe</Process>
    </Processes>
    </Exclusions>
    <Monitoring>ON</Monitoring>
    <StorageAccountName>contosostorage</StorageAccountName>
    </AntimalwareConfig>
  • 操作步骤:

  1. 创建一个配置文件 D:\anti.json(本文以 Json 为例)。

  2. 执行 PowerShell 命令 :

    复制
    Get-AzureVM -ServiceName yourservicename -Name yourvmname | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile 'D:\anti.json' | Update-AzureVM
  3. 执行成功后,可以获取一下当前虚拟机的 Antimalware 的配置 :

    复制
    Get-AzureVM -ServiceName yourservicename -Name yourvmname | get-AzureVMMicrosoftAntimalwareExtension

    或通过登录到虚拟机内部查看配置 :

ARM虚拟机

  • 加载 Antimalware 扩展

    复制
    #通过 PowerShell 加载 Antimalware 扩展,应该至少先定义一个 Antimalware 启动的配置否则无法加载成功
    ############################################################################
    $SettingsString=@{"AntimalwareEnabled" = "true"} Set-AzureRmVMExtension -Publisher Microsoft.Azure.Security -ExtensionType IaaSAntimalware -ResourceGroupName yourgroupname -VMName youvmname -Name IaaSAntimalware -TypeHandlerVersion 1.3 -Location chinanorth -Settings $SettingsString

<a id=configuration>配置字段说明

关于无法在虚拟机内部打开 System Center Endpoint Protection 界面并报错 :

进入指定目录执行以下命令 :

复制
C:\Program Files\Microsoft Security Client>ConfigSecurityPolicy.exe cleanuppolicy.xml

关于如何获取最新的 ARM 虚拟机 Antimalware 镜像扩展信息的方法 :

复制
#确认最新的 Antimalware 服务发布者的名称(有的时候这个名字会因为平台的更新改变)
####################################################
Get-AzureRmVMImagePublisher -Location chinanorth

复制
#获取镜像类型信息
###################################################
Get-AzureRmVMExtensionImageType -PublisherName Microsoft.Azure.Security -Location chinanorth

复制
#获取镜像版本信息
####################################################
$PublisherName = 'Microsoft.Azure.Security'
$PublisherType = 'IaaSAntimalware'
$Location = 'chinanorth'
$Publisher = Get-AzureRmVMExtensionImage -PublisherName $PublisherName -Type $PublisherType -Location $Location
$Version = $Publisher.Version.Substring(0,3)
$Version

Azure 虚拟机如何配置 AntiMalware的更多相关文章

  1. 在 Azure 虚拟机中配置 Always On 可用性组(经典)

    在开始之前,请先假设现在可以在 Azure Resource Manager 模型中完成此任务. 我们建议使用 Azure Resource Manager 模型来进行新的部署. 请参阅 Azure ...

  2. 如何在 Azure 虚拟机里配置条带化

    什么是条带化(striping) 条带 (strip) 是把连续的数据分割成相同大小的数据块,把每段数据分别写入到阵列中的不同磁盘上的方法.简单的说,条带是一种将多个磁盘驱动器合并为一个卷的方法. 许 ...

  3. 运行预构建 Linux 映像的 Windows Azure 虚拟机中的交换空间 – 第 1 部分

    本文章由 Azure CAT 团队的 Piyush Ranjan (MSFT) 撰写. 随着基础结构服务(虚拟机和虚拟网络)近期在 Windows Azure 上正式发布,越来越多的企业工作负荷正在向 ...

  4. 利用Azure虚拟机安装Dynamics 365 Customer Engagement之十:为SQL Server配置Always On

    我是微软Dynamics 365 & Power Platform方面的工程师罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面 ...

  5. Azure ARM (11) ARM模式下,创建虚拟机并配置负载均衡器

    <Windows Azure Platform 系列文章目录> 本文内容比较多,请大家仔细阅读,谢谢! 在前几章中,我们做了准备工作: 1.创建ARM Resouce Group,叫Lei ...

  6. Azure Backup (3) 使用Azure备份服务,备份Azure虚拟机

    <Windows Azure Platform 系列文章目录> 本将介绍,如何使用Azure备份服务,备份Azure虚拟机. 我们先预先创建2台Windows VM (命名为LeiVM00 ...

  7. 使用mysqlslap对mysql进行压测,观察Azure虚拟机cpu使用率

    一直想做这个测试,原因很简单,很多人一直比较怀疑Azure的虚拟机性能,说相同的配置凭啥比阿里的虚拟机贵那么多,其实,我自己以前也怀疑过,但是接触Azure的几个月,确实发现Azure的虚拟机性能真的 ...

  8. Windows Azure Virtual Machine (31) 迁移Azure虚拟机

    <Windows Azure Platform 系列文章目录> 为什么要写这篇Blog? 之前遇到过很多客户提问: (1)我之前创建的虚拟机,没有加入虚拟网络.现在需要重新加入虚拟机网络, ...

  9. Windows Azure 虚拟网络配置(Point to Site)

    说明:本文以Azure国际版为例,中国版在网络位置会存在一定差异. 1. 场景 虚拟网络为我们提供了在Windows Azure云计算环境上构建网络定义的能力,通过虚拟网络,我们可以方便地将Windo ...

随机推荐

  1. Mac 10.12打开任何来源选项

    在终端中输入: sudo spctl --master-disable 然后输入密码即可.最终会出现如下图所示:

  2. js继承的实现(es5)

    js对面向对象的支持很弱,所以在ES6之前实现继承会绕比较多的弯(类似于对面向对象支持弱,然后强行拼凑面向对象的特性) es5中实现继承的几种方式,父类定义为Super function Super( ...

  3. Android Studio 和 gradle 修改缓存文件夹路径

    Android Studio的缓存文件主要有四个文件夹,分别是 .android 这个文件夹是Android SDK生成的AVD(Android Virtual Device Manager)即模拟器 ...

  4. android studio的jni和so

    1. android studio自己添加代码生成so 代码地址:https://github.com/maogefff/Android-Test-Sample/tree/master/MyJni 参 ...

  5. SSIS教程:创建简单的ETL包 -- 4. 增加错误处理流程(Adding Error Flow Redirection)

    为了处理在转换过程中可能发生的错误,MicrosoftIntegration Services 允许根据每个组件和每个列来决定如何处理无法转换的数据. 可以选择忽略某些列中的失败.重定向整个失败的行或 ...

  6. Orchard源码:缓存设计

    概述 从缓存失效的几种方式开始了解Orchard缓存设计 1.设置失效时间 Func<int> retrieve = () => _cacheManager.Get("te ...

  7. 十五、curator recipes之DistributedQueue

    简介 curator实现了先入先出的分布式消息队列,它采用的是zookeeper的持久化有序节点. 官方文档:http://curator.apache.org/curator-recipes/dis ...

  8. 最短路问题(floyd算法)(优化待续)

    问题描述: 最短路问题(short-path problem):若网络中的每条边都有一个数值(长度.成本.时间等),则找出两节点(通常是源节点和阱节点)之间总权和最小的路径就是最短路问题.最短路问题是 ...

  9. python Django 路由之正则表达式

    一.路由系统,URL 1. url(r'^index',views.index) #默认的                  url(r'^home',views.Home.as_view()) # ...

  10. process对象

    一.目录 process对象是Node的一个全局对象,提供当前Node进程的信息.它可以在脚本的任意位置使用,不必通过require命令加载.该对象部署了EventEmitter接口. 二.属性 pr ...