Error during Install-CertificationAuthority

Jun 21, 2012 at 12:08 PM



I use the following script to install a CA

Install-CertificationAuthority -CAName $CaName -CADNSuffix $CADNSuffix -CAType $CAType -Keylength $Keylength -ValidForYears $ValidForYears -RequestFileName $Requestfile -DBDirectory $DBDir -LogDirectory $LogDir -Force



$CAType="Enterprise Subordinate"


I get the following Error


Exception calling "GetKeyLengthList" with "1" argument(s): "CCertSrvSetup::GetKeyLengthList: Invalid pointer 0x80004003
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSPKI\Install-CertificationAuthority.ps1:134 char:32
+         if ($CASetup.GetKeyLengthList <<<< ($CSP).Length -eq 1) {
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

The CA is installed and I have request file.


Jun 21, 2012 at 2:44 PM

this is a bug. Tomorrow I'll issue a patch. Please contact me via email if you wish to get updated file immediately.


Jun 22, 2012 at 6:43 AM

Thanks, by the way, nice work. Thnks for teh scripts.

Jun 22, 2012 at 4:06 PM

This release: has updated Install-CertificationAuthority command with fixed key length parameter handling.