Created
September 4, 2017 02:47
-
-
Save timb-machine/c84fabc7bb22081f8bbe9ff8e6987261 to your computer and use it in GitHub Desktop.
get-sigs.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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