为规模集中的 VM 配置 Windows Defender
Configure Windows Defender for VMs in Scaleset
我有一个包含 5 个 VM 的 Azure Scaleset。当我将我的应用程序(服务结构应用程序)部署到规模集时,Windows Defender 实时保护导致 CPU/Memory 达到最大值。我认为这是因为 Windows Defender 软件中没有设置适当的排除项。
谁能告诉我是否可以在每个 VM 上配置排除项而无需对所有 VM 进行 RDP?
Can anyone tell me if I can configure the exclusions on each VM
without having to RDP on to all of the VMs?
据我所知,你应该为你的镜像配置排除,然后将这个镜像上传到Azure,然后使用这个镜像创建新的VMSS,这样,之后您增加 VMSS 实例,新创建的 vmss 实例将不受 Windows Defender 软件的影响。
通常这是 VM 级配置,因此通常通过已经设置好的自定义 VM 映像或通过将 Defender 配置为即将出现的机器的一部分的 VM 扩展来管理(这类似于@jason-ye-msft 的答案)。关于在集群中设置反恶意软件有一些类似的指导 here。
# Script to add Microsoft Antimalware extension to VM Scale Set(VMSS) and Service Fabric Cluster(in turn it used VMSS)
# Login to your Azure Resource Manager Account and select the Subscription to use
Login-AzureRmAccount
# Specify your subscription ID
#$subscriptionId="SUBSCRIPTION ID HERE"
Select-AzureRmSubscription -SubscriptionId $subscriptionId
# Specify location, resource group, and VM Scaleset for the extension
#$location = "LOCATION HERE" # eg., “West US or Southeast Asia” or “Central US”
#$resourceGroupName = "RESOURCE GROUP NAME HERE"
#$vmScaleSetName = "YOUR VM SCALE SET NAME"
# Configuration.JSON configuration file can be customized as per MSDN documentation: https://msdn.microsoft.com/en-us/library/dn771716.aspx
#$settingString = ‘{"AntimalwareEnabled": true}’;
# retrieve the most recent version number of the extension
$allVersions= (Get-AzureRmVMExtensionImage -Location $location -PublisherName “Microsoft.Azure.Security” -Type “IaaSAntimalware”).Version
$versionString = $allVersions[($allVersions.count)-1].Split(“.”)[0] + “.” + $allVersions[($allVersions.count)-1].Split(“.”)[1]
$VMSS = Get-AzureRmVmss -ResourceGroupName $resourceGroupName -VMScaleSetName $vmScaleSetName
Add-AzureRmVmssExtension -VirtualMachineScaleSet $VMSS -Name “IaaSAntimalware” -Publisher “Microsoft.Azure.Security” -Type “IaaSAntimalware” -TypeHandlerVersion $versionString
Update-AzureRmVmss -ResourceGroupName $resourceGroupName -Name $vmScaleSetName -VirtualMachineScaleSet $VMSS
Service Fabric 团队确实有关于 how to configure your environment 的指南,其中包含有关您要添加的排除项的信息。其中包括:
Antivirus Excluded directories
Program Files\Microsoft Service Fabric
FabricDataRoot (from cluster configuration)
FabricLogRoot (from cluster configuration)
Antivirus Excluded processes
Fabric.exe
FabricHost.exe
FabricInstallerService.exe
FabricSetup.exe
FabricDeployer.exe
ImageBuilder.exe
FabricGateway.exe
FabricDCA.exe
FabricFAS.exe
FabricUOS.exe
FabricRM.exe
FileStoreService.exe
目前尚不清楚是否有好的方法可以在启用反恶意软件扫描的同时设置这些排除项。
我有一个包含 5 个 VM 的 Azure Scaleset。当我将我的应用程序(服务结构应用程序)部署到规模集时,Windows Defender 实时保护导致 CPU/Memory 达到最大值。我认为这是因为 Windows Defender 软件中没有设置适当的排除项。
谁能告诉我是否可以在每个 VM 上配置排除项而无需对所有 VM 进行 RDP?
Can anyone tell me if I can configure the exclusions on each VM without having to RDP on to all of the VMs?
据我所知,你应该为你的镜像配置排除,然后将这个镜像上传到Azure,然后使用这个镜像创建新的VMSS,这样,之后您增加 VMSS 实例,新创建的 vmss 实例将不受 Windows Defender 软件的影响。
通常这是 VM 级配置,因此通常通过已经设置好的自定义 VM 映像或通过将 Defender 配置为即将出现的机器的一部分的 VM 扩展来管理(这类似于@jason-ye-msft 的答案)。关于在集群中设置反恶意软件有一些类似的指导 here。
# Script to add Microsoft Antimalware extension to VM Scale Set(VMSS) and Service Fabric Cluster(in turn it used VMSS)
# Login to your Azure Resource Manager Account and select the Subscription to use
Login-AzureRmAccount
# Specify your subscription ID
#$subscriptionId="SUBSCRIPTION ID HERE"
Select-AzureRmSubscription -SubscriptionId $subscriptionId
# Specify location, resource group, and VM Scaleset for the extension
#$location = "LOCATION HERE" # eg., “West US or Southeast Asia” or “Central US”
#$resourceGroupName = "RESOURCE GROUP NAME HERE"
#$vmScaleSetName = "YOUR VM SCALE SET NAME"
# Configuration.JSON configuration file can be customized as per MSDN documentation: https://msdn.microsoft.com/en-us/library/dn771716.aspx
#$settingString = ‘{"AntimalwareEnabled": true}’;
# retrieve the most recent version number of the extension
$allVersions= (Get-AzureRmVMExtensionImage -Location $location -PublisherName “Microsoft.Azure.Security” -Type “IaaSAntimalware”).Version
$versionString = $allVersions[($allVersions.count)-1].Split(“.”)[0] + “.” + $allVersions[($allVersions.count)-1].Split(“.”)[1]
$VMSS = Get-AzureRmVmss -ResourceGroupName $resourceGroupName -VMScaleSetName $vmScaleSetName
Add-AzureRmVmssExtension -VirtualMachineScaleSet $VMSS -Name “IaaSAntimalware” -Publisher “Microsoft.Azure.Security” -Type “IaaSAntimalware” -TypeHandlerVersion $versionString
Update-AzureRmVmss -ResourceGroupName $resourceGroupName -Name $vmScaleSetName -VirtualMachineScaleSet $VMSS
Service Fabric 团队确实有关于 how to configure your environment 的指南,其中包含有关您要添加的排除项的信息。其中包括:
Antivirus Excluded directories
Program Files\Microsoft Service Fabric
FabricDataRoot (from cluster configuration)
FabricLogRoot (from cluster configuration)
Antivirus Excluded processes
Fabric.exe
FabricHost.exe
FabricInstallerService.exe
FabricSetup.exe
FabricDeployer.exe
ImageBuilder.exe
FabricGateway.exe
FabricDCA.exe
FabricFAS.exe
FabricUOS.exe
FabricRM.exe
FileStoreService.exe
目前尚不清楚是否有好的方法可以在启用反恶意软件扫描的同时设置这些排除项。