By I get this error NotImplementedException, could it be, that the order of the modules is wrong?
The function Write-ErrorMessage was importet after it was called from PSPKI.psm1?
```
VERBOSE: Loading module from path 'C:\PowerShellRepro\Modules\PSPKI\PSPKI.psd1'.
VERBOSE: Loading 'Assembly' from path 'C:\PowerShellRepro\Modules\PSPKI\Library\PKI.Core.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\PowerShellRepro\Modules\PSPKI\Library\Interop.CERTADMINLib.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\PowerShellRepro\Modules\PSPKI\Library\Interop.CERTCLILib.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\PowerShellRepro\Modules\PSPKI\Library\Interop.CERTENROLLLib.dll'.
VERBOSE: Loading 'TypesToProcess' from path 'C:\PowerShellRepro\Modules\PSPKI\Types\PSPKI.Types.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\PowerShellRepro\Modules\PSPKI\Types\PSPKI.Format.ps1xml'.
VERBOSE: Loading module from path 'C:\PowerShellRepro\Modules\PSPKI\PSPKI.psm1'.
Write-ErrorMessage : Exception of type 'Microsoft.PowerShell.Commands.WriteErrorException' was thrown.
At C:\PowerShellRepro\Modules\PSPKI\PSPKI.psm1:122 char:9
+ catch {Write-ErrorMessage -Source "CAPIUnavailable"}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : NotImplementedException,Write-ErrorMessage
VERBOSE: Exporting function '__RestartCA'.
VERBOSE: Exporting function 'Test-XCEPCompat'.
VERBOSE: Exporting function 'Ping-Wmi'.
VERBOSE: Exporting function 'Ping-ICertAdmin'.
VERBOSE: Exporting function 'Write-ErrorMessage'.
VERBOSE: Importing function 'Ping-ICertAdmin'.
VERBOSE: Importing function 'Ping-Wmi'.
VERBOSE: Importing function 'Test-XCEPCompat'.
VERBOSE: Importing function 'Write-ErrorMessage'.
VERBOSE: Importing function '__RestartCA'.
```
Comments: this exception is raised because ADCS Management Tools (RSAT) are not installed.