Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

MakeCert fails

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 12-30-2007   #1 (permalink)
Marc Scheuner
Guest


 

MakeCert fails

Folks,

Based on Lee Holmes' book "PowerShell Cookbook", I'm trying to create
a new self-signed certificate for my testing.

I use Lee's script "New-SelfSignedCertificate.ps1", but it keeps
failing on me:
Quote:

> makecert -n "CN=PowerShell Local Certificate Root" -a sha1 `
> -eku 1.3.6.1.5.5.7.3.3 -r -sv $keyPath root.cer `
> -ss Root -sr localMachine
Error: Can't access the key of the subject ('C:\temp\root.pvk')
Failed

What's wrong?? I have a "c:\temp" directory, and I have write access
to it - running on Win XP SP2 (standalone PC, not member in a domain
or network).

I can't seem to find anything as to why this is failing - seems
everybody else has no trouble with it :-(

Any hints??

Thanks!
Marc

My System SpecsSystem Spec
Old 12-30-2007   #2 (permalink)
Marco Shaw [MVP]
Guest


 

Re: MakeCert fails

Marc Scheuner wrote:
Quote:

> Folks,
>
> Based on Lee Holmes' book "PowerShell Cookbook", I'm trying to create
> a new self-signed certificate for my testing.
>
> I use Lee's script "New-SelfSignedCertificate.ps1", but it keeps
> failing on me:
>
Quote:

>> makecert -n "CN=PowerShell Local Certificate Root" -a sha1 `
>> -eku 1.3.6.1.5.5.7.3.3 -r -sv $keyPath root.cer `
>> -ss Root -sr localMachine
>
> Error: Can't access the key of the subject ('C:\temp\root.pvk')
> Failed
>
> What's wrong?? I have a "c:\temp" directory, and I have write access
> to it - running on Win XP SP2 (standalone PC, not member in a domain
> or network).
Seems strange on first glance...

I'd try dropping these lines for fun and see what happens then:
#$keyPath = Join-Path ([IO.Path]::GetTempPath()) "root.pvk"

Also change:
-eku 1.3.6.1.5.5.7.3.3 -r -sv $keyPath root.cer `

To:
-eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer `

If that works, search your system for root.pvk so you can delete it:
get-childitem c:\ -recurse root.pvk

Marco


--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
P-2-V fails JohnC Virtual Server 2 06-28-2008 09:07 PM
Complete PC Backup fails, restore fails differently! Harry Coin Vista performance & maintenance 5 11-19-2007 03:42 PM
Windows Explorer fails and fails and fails... Bill Vista General 30 06-09-2007 10:57 PM
IE7 fails Bud Vista General 0 06-21-2006 03:06 PM
fails at 27% Stephan Vista installation & setup 0 06-09-2006 08:29 PM


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008