Error importing PSPKI module {Write-ErrorMessage -Source "CAPIUnavailable"}

Jul 13, 2016 at 2:19 PM
Hello

I received a brand new HP laptop from work, with Windows 7 x64 (until we upgrade to W10) and downloaded and installed PSPKI.

When I try to import PSPKI I receive the following error

Write-ErrorMessage : Exception of type 'Microsoft.PowerShell.Commands.WriteErrorException' was thrown.
At C:\Program Files\Sysadmins LV\PowerShell\Modules\pspki\PSPKI.psm1:122 char:9
  • catch {Write-ErrorMessage -Source "CAPIUnavailable"}
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotImplemented: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : NotImplementedException,Write-ErrorMessage
I have my PowerShell prompt open as an administrator of the laptop

I then removed PSPKI and installed an earlier version but received the same error

therefore I am wondering of it some thing to do with a new TPM in the laptop or something missing from the Windows 7 build on the new laptop,

Any advise most welcome as I kind or rely on this excellent module these days :)

Thanks very much
Ernie
Jul 13, 2016 at 2:45 PM
Hello

I resolved the issue

I need to install the CA Remote Administration tools (Add/Remove Windows Components) as I did not have the COM object available until the admin tools were installed.

Thanks
Ernie
Marked as answer by Camelot on 8/7/2016 at 8:17 AM