As you may know, you can sign your scripts to ensure they’ll run on “AllSigned” policy, or to be sure about their integrity.
You can find your code signing certificates with :
Get-ChildItem cert:CurrentUserMy -CodeSigning
So you can sign scripts file with :
$cert = @(Get-ChildItem cert:CurrentUserMy -CodeSigning) Set-AuthenticodeSignature file.ps1 $cert
And then, check the signature with :