Import-PfxCertificate cannot find the drive with the name 'Cert'

Product: PowerShell Universal
Version: 4.4.1

Hello,

This issue is very specific but It’s my last hope to find a solution.

I have a script named Get-SMIMECertificate.ps1 that is used to retrieve a certificate from a source. Enrypt it with a password and send it to the specified user by mail.

I use the cmd import-pfxcertificate to import the certificate in the cert store in order to later export it with another password.

This script is working in the v3.10.5 but I realise that the upgrade is long due. However, the issue is that when I upgrade to the v4.4.1, the script stops working.

The cmdlet “Import-PFXCertificate” now return the error "Import : Cannot find drive. A drive with the name ‘Cert’ does not exist. "

The weird thing is that I do find the drive ‘Cert’ by executing “Get-PSDrive” (in the same context). And I can see the content of it by executing the cmdlet ‘Get-ChildItem -Path “Cert:\CurrentUser\My”’ (in the same context again). So the drive ‘Cert’ do exist.

In both instance the script is executed using a local account we’ll name “vincent”. The only thing that changed is the PSU version (v3.10.5 to v4.4.1).

If anyone has something I could try I would be very grateful.