From LedHed's Wiki
Jump to: navigation, search
(Created page with "== Quick -N- Dirty == # Make sure your CA has the "Code Signing" template installed === Create a Code Signing Cert === # Run MMC.exe and the "Certificates" snap-in and choos...")
 
Line 4: Line 4:
  
 
=== Create a Code Signing Cert ===
 
=== Create a Code Signing Cert ===
# Run MMC.exe and the "Certificates" snap-in and choose "My user account"
+
# Run MMC.exe add the "Certificates" snap-in and choose "My user account"
 
# Right click "Personal", click "All Tasks", click "Request New Certificate..."
 
# Right click "Personal", click "All Tasks", click "Request New Certificate..."
 
# Next, Next, select "Code Signing" and click "Enroll", "Finished"
 
# Next, Next, select "Code Signing" and click "Enroll", "Finished"

Revision as of 20:45, 1 November 2015

Quick -N- Dirty

  1. Make sure your CA has the "Code Signing" template installed


Create a Code Signing Cert

  1. Run MMC.exe add the "Certificates" snap-in and choose "My user account"
  2. Right click "Personal", click "All Tasks", click "Request New Certificate..."
  3. Next, Next, select "Code Signing" and click "Enroll", "Finished"


PowerShell

1. Open PowerShell (run as Administrator)
2. Run:

Set-ExecutionPolicy RemoteSigned

3. Answer yes to the prompt
4. Close PowerShell
5. Open PowerShell (Not as Administrator) 6. Run:

Set-AuthenticodeSignature <Full-Path-To-Your-Script> @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0]

Note: Only change <Full-Path-To-Your-Script>, leave cert:\CurrentUser\My alone!

Your script should now be signed.


References

https://community.landesk.com/support/docs/DOC-25237

http://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system