Adding Self Signed Certificate to trusted root certificate store using Command Line

The PowerShell command Import-Certificate can be used to import a certificate:

Import-Certificate -FilePath "C:\path\Cert.Cer" -CertStoreLocation cert:\CurrentUser\Root

To run it through the Command Prompt (or batch) you may run it as:

powershell "Import-Certificate -FilePath ^"C:\path\Cert.Cer^" -CertStoreLocation cert:\CurrentUser\Root"

Note above the use of the ^ escape character.

To list all available certificate stores, start a PowerShell session and enter:

dir cert:\\LocalMachine\