Issue when trying to load module via PSSession

Jun 11, 2014 at 8:31 AM

Can you please help with the following query/issue re module PSPKI

If I do the following
enter-pssession -computername RemoveSRV1

they type $Host, I get version
if I type $PSVersionTable I get PSVersion

if I then do Import-Module BitsTransfer it works OK
if I do Import-Module PSPKI I get the follow error

Import-Module : The current PowerShell host is: 'ServerRemoteHost' (version The module 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\pspki\pspki.psd1' requires a minimum PowerShell ho
st version of '2.0' to execute.
+ CategoryInfo          : ResourceUnavailable: (C:\WINDOWS\syst...spki\pspki.psd1:String) [Import-Module], InvalidOperationException
+ FullyQualifiedErrorId : Modules_InsufficientPowerShellHostVersion,Microsoft.PowerShell.Commands.ImportModuleCommand
As PSSession environement appears to provide a v1 host shell

However I can still import-module BitsTransfer as above, therefore O looked for a

requires -version 2

statement in either PSPKI.psm1 or PSPKI.psd1
However I cannot find it.

Is there any way around this issue please?

Jun 11, 2014 at 4:42 PM
which version of PSPKI you are using?
Jun 16, 2014 at 2:51 PM

Sorry for the late reply, I am running version 2.6

actually rather than remoting the the Server hosting the CA (Windows 2003 R2 Enterprise CA) I would like to load and use the PSPKI module locally on my Windows 7 PC.
However I see there one or more DLL I need to install/register on my PC in the first instance as I get the following error message, when trying to use Get-IssuedRequest for example

Write-ErrorMessage : Unable to connect to management interfaces on ''
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\pspki\Server\Get-RequestRow.ps1:86 char:10
  • } else {Write-ErrorMessage -Source ICertAdminUnavailable -ComputerName $CA.Comp ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ResourceUnavailable: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : ResourceUnavailableException,Write-ErrorMessage
Therefore which DLL from the Windows 2003 R2 CA x86 do I need to copy/register to my Windows x64 PC (of this is possible)

Thank You
Jun 16, 2014 at 2:59 PM
There are two notes:
1) PSPKI launch in remote sessions is allowed starting with v2.8 (current release)
2) Client operating systems (as well as non-CA servers) must have ADCS RSAT component.

you must not copy any system DLL between computers with different OS versions and/or platform types. In your case, you have to install ADCS RSAT component.
Jun 16, 2014 at 3:52 PM
Thanks very much

"ADCS RSAT component" of course Duh! I should have realised this straight away

Thanks Again :)