I've come across the below error when running the initialisation script of the Sitecore 10 with docker walkthrough with license and password as parameters.

.\init.ps1 -InitEnv -LicenseXmlPath "C:\source\licenses\sitecore\license.xml" -AdminPassword "TestPassword132435"


Preparing your Sitecore Containers environment!
Importing SitecoreDockerTools...
Generating Traefik TLS certificate...
Using the local CA at "C:\Users\p.fonseca\AppData\Local\mkcert" ✨
The local CA is already installed in the system trust store! 👍
Note: Firefox support is not available on your platform. ℹ️    

Using the local CA at "C:\Users\p.fonseca\AppData\Local\mkcert" ✨

Created a new certificate valid for the following names 📜
 - "*.myproject.localhost"

Reminder: X.509 wildcards only go one level deep, so this won't match a.b.myproject.localhost ℹ️

The certificate is at "./_wildcard.myproject.localhost.pem" and the key at "./_wildcard.myproject.localhost-key.pem" ✅

Adding Windows hosts file entries...
Populating required .env file values...

Remove-Item : An object at the specified path C:\Users\P6D60~1.FON does not exist.
At C:\Users\p.fonseca\Documents\WindowsPowerShell\Modules\SitecoreDockerTools\10.0.5\Public\Get-SitecoreCertificateAsBase64String.ps1:57 char:16
+     $pfxPath | Remove-Item
+                ~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RemoveItemCommand


The error occurs at the SITECORE_ID_CERTIFICATE step when SitecoreCertificateAsBase64String is called to fetch a certificate.

Would anyone more knowledgeable know what's happening under the hood and why C:\Users\P6D60~1.FON is the path being searched for?

Is there any parameter I should use to point SitecoreCertificateAsBase64String to another location? Or perhaps any additional step I am missing prior to running init.ps1?

Thank you.


There's a . in my user name which I suspect causes the issue. Cheers Mark Cassidy for pointing it out on slack.

| improve this answer | |

I have the same issue, its looking for the path C:\Users\PAPIYA~1.DHA which does not exist.

I first uninstalled the SitecoreDockerTools module. Changed the default directory of the SitecoreDockerTools module to a custom directory by making changes in the init.ps1 script, before setting the env file variables.

if (-not (Test-Path -Path 'C:\WindowsPowershellModules\SitecoreDockerTools\10.0.5\SitecoreDockerTools.psm1')) { Find-Module -Name 'SitecoreDockerTools' -Repository 'PSGallery' | Save-Module -Path 'C:\WindowsPowershellModules' }

Import-Module -Name 'C:\WindowsPowershellModules\SitecoreDockerTools\10.0.5\SitecoreDockerTools.psm1' -Verbose

Downloaded mkcert from https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-windows-amd64.exe as defined in the script, renamed it to mkcert.exe and copied in the path C:\Windows\System32

After rerunning the script, I still get an error at Get-SitecoreCertificateAsBase64String, but it populates the env file correctly and also executes the remaining steps to create the certs in the path docker-examples\getting-started\traefik\certs

Poweshell screenshot

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.