Is there any way to check for digital signature on a file programmatically in Powershell?
Try the Get-AuthenticodeSignature
-cmdlet
(Get-AuthenticodeSignature "C:\windows\explorer.exe").Status -eq 'Valid'
True
(Get-AuthenticodeSignature "D:\notes.txt").Status -eq 'Valid'
False
You could simply call signtool.exe to verify the result.