Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have got a peculiar problem. I created a local certificate and I signed a script file with it. When it completes, it sais that the status is valid. But when I try to run the error, I get an error. When I check the Get-AuthenticodeSignature it says my script status is "Unknown Error". I've checked everything, down to the encoding of the file (yes, it's UTF-8, I recreated the file just to be sure, no dice).

Anybody have any idea what is going on?

Error image.
Posted
Updated 6-Aug-13 21:35pm
v4
Comments
virusstorm 8-Aug-13 13:21pm    
Do you have it configured to use self signed certificates?
KenBonny 13-Aug-13 4:11am    
No, no I have not. Didn't know I should do that. I'll look into it. Thanks.

Will editing the execution policy to RemoteSigend work? Because it was AllSigned. Or did you refer to something else?
virusstorm 13-Aug-13 11:53am    
This URL has some details that might help you.
http://technet.microsoft.com/en-us/library/ee176961.aspx

Typically what I do to help verify that my script is working correctly and it isn't a signing issue is I will temporarily go "Unrestricted".

The other thing you might be running into is your certificate may not be signed by a trusted provider. You said you created a local certificate, how did you go about doing that?
KenBonny 14-Aug-13 8:33am    
I followed the instructions on a website (which I can't seem to find anymore). It basicly said to create a .cer and .pvk file and then use those to create a local certificate and sign the script with that.

But setting the policy to RemoteSigned will work for my company's security rules. Thanks for the information!

1 solution

I changed the ExecutionPolicy to RemoteSigned.

Thanks to virusstorm for the solution. (If he posts the same solution, I'll accept it as the solution and give credit to him.)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900