This project is read-only.
1
Vote

CAPI Issue when Attempting to Load Module

description

VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1'.
Write-ErrorMessage : Exception of type 'Microsoft.PowerShell.Commands.WriteErrorException' was thrown.At C:\Program Files\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:123 char:9
  • catch {Write-ErrorMessage -Source "CAPIUnavailable"}
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotImplemented: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : NotImplementedException,Write-ErrorMessage

comments

jkorell wrote Jan 12 at 6:35 PM

This did not used to be an issue. I am unsure what I did to cause this new issue. Any assistance would be greatly appreciated.

AuroreFractale wrote Feb 22 at 1:35 PM

I am running Powershell v4 in Unrestricted mode on Windows 7 x64 as admin user after to have installed PSPKI, and I get exactly the same error while loading it :

PS C:\Windows\system32> Import-Module PSPKI
Write-ErrorMessage : Exception of type 'Microsoft.PowerShell.Commands.WriteErrorException' was thrown.
At C:\Users\rgoeneau\Documents\WindowsPowerShell\Modules\PSPKI\PSPKI.psm1:122 char:9
  • catch {Write-ErrorMessage -Source "CAPIUnavailable"}
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotImplemented: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : NotImplementedException,Write-ErrorMessage
If I execute again Import-Module PSPKI it does not display anything. But PSPKI features (for example New-SelfSignedCertificateEx) are unavailable.

Thanks

Camelot wrote Feb 22 at 3:52 PM

The module consist of two components, Client and Server (there is a choice in MSI installer). When you install server component, it requires ADCS remote server administration tools (ADCS). Either, install ADCS RSAT or remove Server folder from module folder if you don't plan to manage ADCS servers.