You can/should, of course, use a trusted CA, just make sure it has the CodeSigning attribute.
The previous code snippet was just an example to try out signing scripts (since you mentioned you didn't get the signature block in the script).
Btw, there is a difference between signing and encrypting, but you probably know that.