"Set-AuthenticodeSignature" returns Unknown Error while registering the script with a certificate

Recently I have been working on a PowerShell Project where I needed to sign the scripts with the code signing certificates (the ExecutionPolicy was set to “AllSigned”). I did this before many times without a single problem/error. But this time when I tried to sign the scripts with the certificates I got the “Unknown” error…

3