If you have Powershell code it is a good idea to sign this code for security and to confirm it has not been tampered with, to complete this first you need to get a valid "code signing certificate" this usually is an external authority (this can also be an internet certificate authority as well if you have one)
When the generate the certificate you need to ensure the "Enhanced Key Usage" option includes "Code Signing" as below:
When you have this certificate leave it in the Personal store, now you need to select that certificate and add it to the variable $cert with this:
$cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert
Then lets echo $cert to ensure we have a valid certificate selected and valid with:
$cert
Then we need to set this as the signing certificate for our Powershell with this, using the variable:
Set-AuthenticodeSignature -FilePath <script>.ps1 -Certificate $cert
That should look like this:
When this command as completed if you check the properties you will notice is not has a "Digital Certificates" option: