通常这是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
服务结构团队在以下方面有指导
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
目前尚不清楚是否有一种好方法可以在启用反恶意软件扫描的同时设置这些排除。