I\'d like to check programatically if a file has been digitally signed or not.
For the moment, I found a rather obscure code in MSDN, that doesn\'t compile...
<
Since Powershell 5.1, you can use Get-AuthenticodeSignature to verifiy the signature of a Binary or a PowerShell Script.
> Get-AuthenticodeSignature -FilePath .\MyFile.exe
SignerCertificate Status Path
----------------- ------ ----
A59E92E31475F813DDAF41C3CCBC8B78 Valid MyFile.exe
Or
> (Get-AuthenticodeSignature -FilePath .\MyFile.exe).Status
Valid