PSPKI
PSPKI copied to clipboard
Import-Module PSPKI always needed
When I try to use PSPKI after installing or opening a ne PowerShell instance, I need to load it with Import-Module. I am using Windows Server 2019. It also wont show up in Get-Modules until I import it again.
It is expected behavior since Windows PowerShell 5+. PowerShell no longer autoloads the module by simply calling a command from installed and non-loaded module. Use Get-Module -ListAvailable
to get a list of installed modules.
Interesting. Other modules load automatically. Only PSPKI does not
How did you install the module? What is your $PSVersionTable
? What returns $PSModuleAutoloadingPreference
?
I installed it with "Install-Module -Name PSPKI"
$PSVersionTable:
Name Value
PSVersion 5.1.17763.592 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.592 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
$PSModuleAutoloadingPreference is empty but according to Microsoft this means "all"
I've got the same issue (as listed by duplicate). PoSH 5.1 does load modules dynamically.
Impot-Module is normally not a requirement as long as the module is stored in a folder listed by $env:PSModulePath
I've got the same issue (as listed by duplicate). PoSH 5.1 does load modules dynamically.
Impot-Module is normally not a requirement as long as the module is stored in a folder listed by $env:PSModulePath
Is PSPKI module installed in a path referenced in $env:PSModulePath? Where exactly PSPKI is installed?
It's installed using Install-Module pspki -Scope CurrentUser
C:> get-module pspki -ListAvailable
Directory: C:\Users\XXXXX\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 3.7.2 PSPKI {Add-AdCertificateRevocationList, Start-PsFCIV, Get-AdPkiConta...
Unable to repro. Additional details needed. As a general recommendation, call Import-Module PSPKI
explicitly before using it. Seems module autoload isn't reliable in all cases.