Skip to content

Instantly share code, notes, and snippets.

@timb-machine
Created September 4, 2017 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timb-machine/c84fabc7bb22081f8bbe9ff8e6987261 to your computer and use it in GitHub Desktop.
Save timb-machine/c84fabc7bb22081f8bbe9ff8e6987261 to your computer and use it in GitHub Desktop.
get-sigs.ps1
function Get-Sigs($directorypath = $pwd, [string[]]$patternstring = "*.exe") {
foreach ($fileitem in Get-ChildItem $directorypath)) {
if ($patternstring | Where { $fileitem -Like $_ }) {
Get-AuthenticodeSignature $fileitem.FullName
}
if (Test-Path $fileitem.FullName -PathType Container) {
Get-Sigs $fileitem.FullName $patternstring
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment