Skip to content

Instantly share code, notes, and snippets.

@edygert
Created August 8, 2022 15:52
Show Gist options
  • Save edygert/96f8dd075aa50121b19efaf34e57a7af to your computer and use it in GitHub Desktop.
Save edygert/96f8dd075aa50121b19efaf34e57a7af to your computer and use it in GitHub Desktop.
Remove duplicates from AMSI output
$Seen = @{}
foreach ($elem in $AMSIScanEvents) {
if (-not $Seen.ContainsKey($elem.Hash)) {
$elem
$Seen[$elem.Hash] = ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment