Windows Xp: Creating A Private Key To Sign A Powershell Script With Makecert Is No Longer Possible?

Discussion in 'Software' started by olspookishmagus, Oct 5, 2017.

  1. olspookishmagus

    olspookishmagus Private E-2

    Hello.

    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:

    Code:
    C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>makecert -n "CN=PowerShell Local Certificate Root" -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -sr localMachine
    Error: Can't create the key of the subject ('root.pvk')
    Failed
    And so I've begun trying to debug this, with no success.

    So far I've checked with these:
    • 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

    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.

    Thanks in advance.
     
  2. MaxTurner

    MaxTurner Banned

  3. olspookishmagus

    olspookishmagus Private E-2

    Guilty as charged of crossposting.
    Surely but no. I will update all the relevant threads if this gets somehow solved.
     
  4. Eldon

    Eldon Major Geek Extraordinaire

  5. olspookishmagus

    olspookishmagus Private E-2

    OK, this has been resolved following some guidance receive in another community I cross-posted this to and now the least I can do for it is to update this thread with the solution along with my apologies.

    As it seems, the makecert I was trying to execute that command was not the correct one. The correct one comes bundled with the Windows SDK I've already linked and it has version: 6.1.7600.16385 and SHA1SUM: 7fd7f36b5acbe69de6c966b397341fd1ddbb04a1.

    With that particular makecert the above command with those (and even more advanced ones) are being carried out flawlessly.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds