I'm struggling to create a private key in order then to use to sign a PowerShell Script and I would really use some help on this.
Firstly I wanted to be able to run PowerShell scripts without having to lower PowerShell's Execution-Policy and in order to do that one should have to be able to sign scripts.
Therefore and after installing the Windows SDK I'm trying to create a private key (and then a certificate) in order to be able to sign scripts.
But this fails likewise:C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>makecert -n "CN=PowerShell Local Certificate Root" -a sha1 -eku 22.214.171.124.126.96.36.199.3 -r -sv root.pvk root.cer -ss Root -sr localMachine Error: Can't create the key of the subject ('root.pvk') FailedAnd so I've begun trying to debug this, with no success.
So far I've checked with these:
If you have any ideas or you would like to share your insights or have me walk again over again something I've already tried/mentioned please feel free to comment.
- I checked with makecert's documentation to check whether the command parameters are correct
- executed the command from within a non-special directory
- executed the command as the local Administrator user
- executed the command from an "elevated" Command Prompt or an "elevated" PowerShell
- made sure the security permissions for _ALL_ the Crypto/RSA directories are set as indicated
Thanks in advance.
Edited by hamluis, 04 October 2017 - 10:14 AM.
Moved from XP to Programming - Hamluis.