Before you run an installer, agent or script that arrived from the internet, you should know who signed it and whether it changed after signing. You can verify a digital signature with PowerShell in one command: Get-AuthenticodeSignature -LiteralPath .\file.exe. It returns the signature Status, the SignerCertificate of the publisher and the TimeStamperCertificate, if the file was time-stamped. This guide explains what each field means, what a "Valid" result does and does not prove, and how to combine it with a SHA-256 hash check.
The quick check
Open PowerShell in the folder that contains the file and run:
Get-AuthenticodeSignature -LiteralPath .\setup.exe |
Format-List Status, StatusMessage, SignerCertificate, TimeStamperCertificate
Use -LiteralPath rather than the default -FilePath parameter. Microsoft's documentation notes that -LiteralPath is used exactly as typed, with no characters interpreted as wildcards, which avoids surprises with file names that contain brackets.
A few facts from the Get-AuthenticodeSignature reference are worth knowing before you rely on the output:
- The cmdlet is only available on Windows. It is present in Windows PowerShell 5.1 and in PowerShell 7 on Windows.
- If a file is both embedded-signed and Windows catalog-signed, the catalog signature is the one reported.
- If the file is not signed, you still get an object back, but its signature fields are blank.
How to read the Status field
The Status property is a SignatureStatus value. Microsoft's API reference defines each value as follows (paraphrased closely):
| Status | What Microsoft's documentation says it means |
|---|---|
Valid | The file has a valid signature. The reference adds that this means only that the signature is syntactically valid and does not imply trust in any way. |
NotSigned | The file has no signature. |
HashMismatch | The hash of the file does not match the hash stored with the signature, which means the content differs from what was signed. |
NotTrusted | The certificate was signed by a publisher that is not trusted on the system. |
UnknownError | The file has an invalid signature. |
NotSupportedFileFormat | The system does not know how to sign or verify that file type. |
Incompatible | The signature cannot be verified because it is incompatible with the current system. |
Treat anything other than Valid as a reason to stop and investigate. HashMismatch in particular tells you the file is not the one the publisher signed: do not run it, and download it again from the official source.
"Valid" is not the end of the check
A valid signature tells you the file has not changed since it was signed. It does not tell you that the signer is the company you expected. Anyone who obtains a code-signing certificate can produce a valid signature on their own file. That is why the next step matters: confirm the publisher.
Confirm the signer is the publisher you expect
The SignerCertificate property holds the X.509 certificate of the publisher that signed the file. Its Subject contains the organisation name. Compare it with the publisher name the vendor tells you to expect, ideally on a page you reached independently rather than through the download link.
$sig = Get-AuthenticodeSignature -LiteralPath .\setup.exe
$sig.Status
$sig.SignerCertificate.Subject
$sig.SignerCertificate.Issuer
$sig.SignerCertificate.NotAfter
For a scripted, repeatable check, fail unless both conditions hold:
$file = '.\setup.exe'
$expected = 'Example Software Ltd' # publisher name from the vendor's documentation
$sig = Get-AuthenticodeSignature -LiteralPath $file
if ($sig.Status -ne 'Valid') {
throw "Signature status is $($sig.Status): $($sig.StatusMessage)"
}
if ($sig.SignerCertificate.Subject -notmatch [regex]::Escape($expected)) {
throw "Unexpected signer: $($sig.SignerCertificate.Subject)"
}
"Signed by expected publisher: $($sig.SignerCertificate.Subject)"
This is read-only: it inspects the file and changes nothing on the system.
What the timestamp tells you
Code-signing certificates expire. Microsoft's about_Signing topic explains that a signature is valid until the signing certificate expires, or for as long as a timestamp server can verify that the file was signed while the certificate was valid. The TimeStamperCertificate property shows the authority that time-stamped the file. If it is present, an expired signing certificate is not on its own a problem. If it is empty and the signing certificate has expired, expect the signature to stop validating.
Add a hash check when the vendor publishes one
Some vendors publish a SHA-256 hash for each release. Get-FileHash uses SHA-256 by default, so you can compare directly:
$published = 'PASTE-THE-PUBLISHED-SHA256-HERE'
(Get-FileHash -LiteralPath .\setup.exe -Algorithm SHA256).Hash -eq $published
PowerShell's -eq is case-insensitive for strings, so upper- or lower-case hex both match. Microsoft's Get-FileHash documentation notes that MD5 and SHA1 are no longer considered secure and should only be used for simple change validation, so prefer SHA-256 or stronger.
A hash and a signature answer different questions. A matching hash confirms that you have exactly the file the vendor described on that page. A valid signature from the expected publisher confirms who produced it. A hash only helps if you trust the page that published it, so use both when both are available.
Check many files, or files on remote machines
To list every executable in a folder that does not have a valid signature:
Get-ChildItem -LiteralPath 'C:\Installers' -Filter *.exe |
ForEach-Object { Get-AuthenticodeSignature -LiteralPath $_.FullName } |
Where-Object Status -ne 'Valid' |
Select-Object Path, Status, StatusMessage
Because the command only reads files, it is a reasonable candidate for running across many machines. With PowerShell remoting you can wrap it in Invoke-Command; our guide to PowerShell remote management without RDP compares that with agent-based approaches. In an agent-based tool such as EclipseRMM's PowerShell management, the same read-only command can be submitted to an enrolled, authorized device and the output reviewed in the portal.
The graphical check and SignTool
If you prefer the Windows interface: right-click the file, open Properties, select the Digital Signatures tab, choose the signer and open Details. Windows reports whether the signature is valid and shows the signer.
Developers who have the Windows SDK installed can also use SignTool. Its verify command checks whether the signing certificate was issued by a trusted authority and whether it has been revoked. The /pa option selects the Default Authentication Verification Policy; without it, SignTool uses the Windows Driver Verification Policy:
signtool verify /pa /v setup.exe
Frequently asked questions
Does a valid signature mean a file is safe?
No. It means the file has not changed since it was signed and identifies who signed it. Microsoft's reference states that a Valid status does not imply trust. Whether to run the file is still your decision about that publisher and that file.
Why does a script say "NotSigned" when the vendor says it is signed?
Check that you downloaded the official file and did not copy and paste its contents into a new file. Re-saving or editing a signed script changes it, and if a signed file's content no longer matches the hash stored in its signature, the status is HashMismatch rather than NotSigned.
Can I use this on macOS or Linux?
No. Microsoft documents Get-AuthenticodeSignature as available on Windows only.
Example: verifying the EclipseRMM Windows agent
EclipseRMM publishes the expected values on its agent verification page: the expected publisher is Space Solar Technologies LLC, the filename is ClientUpdater_en_X64.exe, and each release lists its SHA-256 hash. The read-only check is:
Get-AuthenticodeSignature -LiteralPath .\ClientUpdater_en_X64.exe |
Format-List Status, SignerCertificate, TimeStamperCertificate
Get-FileHash -LiteralPath .\ClientUpdater_en_X64.exe -Algorithm SHA256
Stop if the signer is unexpected or validation fails. Once verified, the deployment guide walks through enrollment. The same habit applies to every installer you deploy, from any vendor.
Sources (checked 2026-11-15)
- Microsoft Learn: Get-AuthenticodeSignature
- Microsoft Learn: SignatureStatus enum
- Microsoft Learn: Signature class
- Microsoft Learn: about_Signing
- Microsoft Learn: Get-FileHash
- Microsoft Learn: SignTool