Skip to content

Commit 27e15f7

Browse files
committed
fix code snippet
1 parent 733817c commit 27e15f7

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

defender-endpoint/mde-demonstration-amsi.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,19 @@ In this demonstration article, you have two engine choices to test AMSI:
6060
6161
The result should be as follows:
6262
63-
# Attempt to execute the AMSI Test Sample
64-
65-
```powershell
66-
Invoke-Expression : At line:1 char:1
67-
+ AMSI Test Sample: 7e72c3ce-861b-4339-8740-8ac1484c1386
68-
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69-
This script contains malicious content and has been blocked by your antivirus software.
70-
71-
At C:\Users\Admin\Desktop\AMSI_PoSh_script.ps1:3 char:1
72-
+ Invoke-Expression $testString
73-
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74-
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
75-
+ FullyQualifiedErrorId : ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand
76-
```
63+
### Attempt to execute the AMSI Test Sample
64+
65+
```powershell
66+
Invoke-Expression : At line:1 char:1
67+
+ AMSI Test Sample: 7e72c3ce-861b-4339-8740-8ac1484c1386
68+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69+
This script contains malicious content and has been blocked by your antivirus software.
70+
At C:\Users\Admin\Desktop\AMSI_PoSh_script.ps1:3 char:1
71+
+ Invoke-Expression $testString
72+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
74+
+ FullyQualifiedErrorId : ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand
75+
```
7776

7877

7978
:::image type="content" source="media/mde-demonstrations-amsi/test-amsi-powershell-results.png" alt-text="Screenshot showing the results of the AMSI test sample. It should show a threat was detected." lightbox="media/mde-demonstrations-amsi/test-amsi-powershell-results.png":::

0 commit comments

Comments
 (0)