Skip to content

Commit 5aa5790

Browse files
authored
Update antimalware-code-samples.md
fix the wrong example of Az.ConnectedMachine
1 parent 69abdcf commit 5aa5790

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

articles/security/fundamentals/antimalware-code-samples.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -192,36 +192,34 @@ $resourceGroupName = " RESOURCE GROUP NAME HERE "
192192
$machineName = "MACHINE NAME HERE "
193193
194194
# Enable Antimalware with default policies
195-
$settingString = {"AntimalwareEnabled": true}’;
195+
$setting = @{"AntimalwareEnabled"=$true}
196196
# Enable Antimalware with custom policies
197-
# $settingString = ‘{
198-
# "AntimalwareEnabled": true,
199-
# "RealtimeProtectionEnabled": true,
200-
# "ScheduledScanSettings": {
201-
# "isEnabled": true,
202-
# "day": 0,
203-
# "time": 120,
204-
# "scanType": "Quick"
205-
# },
206-
# "Exclusions": {
207-
# "Extensions": ".ext1,.ext2",
208-
# "Paths":"",
209-
# "Processes":"sampl1e1.exe, sample2.exe"
210-
# },
211-
# "SignatureUpdates": {
212-
# "FileSharesSources": “”,
213-
# "FallbackOrder”: “”,
214-
# "ScheduleDay": 0,
215-
# "UpdateInterval": 0,
216-
# },
217-
# "CloudProtection": true
218-
#
219-
# }’;
220-
197+
$setting2 = @{
198+
"AntimalwareEnabled"=$true;
199+
"RealtimeProtectionEnabled"=$true;
200+
"ScheduledScanSettings"= @{
201+
"isEnabled"=$true;
202+
"day"=0;
203+
"time"=120;
204+
"scanType"="Quick"
205+
};
206+
"Exclusions"= @{
207+
"Extensions"=".ext1, .ext2";
208+
"Paths"="";
209+
"Processes"="sampl1e1.exe, sample2.exe"
210+
};
211+
"SignatureUpdates"= @{
212+
"FileSharesSources"=“”;
213+
"FallbackOrder”=“”;
214+
"ScheduleDay"=0;
215+
"UpdateInterval"=0;
216+
};
217+
"CloudProtection"=$true
218+
}
221219
# Will be prompted to login
222220
Connect-AzAccount
223221
# Enable Antimalware with the policies
224-
New-AzConnectedMachineExtension -Name "IaaSAntimalware" -ResourceGroupName $resourceGroupName -MachineName $machineName -Location $location -SubscriptionId $subscriptionid -Publisher “Microsoft.Azure.Security” -Settings $settingString -ExtensionType “IaaSAntimalware”
222+
New-AzConnectedMachineExtension -Name "IaaSAntimalware" -ResourceGroupName $resourceGroupName -MachineName $machineName -Location $location -SubscriptionId $subscriptionid -Publisher “Microsoft.Azure.Security” -Settings $setting -ExtensionType “IaaSAntimalware”
225223
```
226224

227225
## Next steps

0 commit comments

Comments
 (0)