When trying to use any of the PGP PowerShell functions provided with DidiSoft.Pgp.Powershell.dll, e.g.
you may encounter this error:
The specified module ‘DidiSoft.Pgp.PowerShell’ was not loaded because no valid module file was found in any module directory.
Why is PowerShell not loaded
The main reason why DidiSoft.Pgp.Powershell.dll is not loaded, is because PowerShell cannot find it although it was registered with
The reason for this is that PowerShell searches modules in the locations specified in PSModulePath environment variable.
How to include the part to PSModulePath
In order to include the file system path where DidiSoft.Pgp.PowerShell.dll resides, we must first check where is it. We can do that with the Get-module command
PS> Get-module -ListAvailable
and check where is DidiSoft.Pgp.PowerShell
The next step is to append this path to the Environment variable PSModulePath:
Then we just have to restart the PowerShell console and all the OpenPGP related PowerShell commands will be available.