Skip to content

Instantly share code, notes, and snippets.

@jermdw
Created May 2, 2018 02:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jermdw/f705adafb3f5158c632b52464d9b6e08 to your computer and use it in GitHub Desktop.
Save jermdw/f705adafb3f5158c632b52464d9b6e08 to your computer and use it in GitHub Desktop.
Retrieve unsigned executables in user folders
(gwmi Win32_UserProfile | ? { $_.SID -notmatch "S-1-5-(18|19|20).*" }).LocalPath | % { ls -Path $_ -Recurse -Filter "*.exe" } | % { Get-AuthenticodeSignature -FilePath $_.FullName } | ? { $_.Status -ne 'Valid' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment