A digital signature attaches certificate identity information and a content hash to a PowerShell script. The private key creates the signature; the public key verifies the signer and detects any change. section 21.2 section 21.4
Use signatures as a practical safety check:
- Protect the certificate’s private key, ideally with password protection in the Windows certificate store. section 21.2
- Check a script with Get-AuthenticodeSignature before running it. section 21.4.4
- Treat a broken signature as a reason to investigate, then re-sign only after confirming the change. section 21.4.4
PS C:\scripts> Get-AuthenticodeSignature .\psvm.ps1
Directory: C:\scripts
SignerCertificate Status Path
----------------- ------ ----
9D16AF2573AC6C01A33752CA5135F3700A6FE9CF Valid psvm.ps1
A compact PowerShell listing shows a valid Authenticode status for a signed script. section 21.4.4







