Export certificate files with script
- Last UpdatedOct 29, 2026
- 2 minute read
This is a procedure for exporting certificate files using the SecureChannelCertificateInstaller.ps1 script.
Exporting certificates is used to create certificate files associated with the correctly named root certificate authority (CA) in the Windows certificate store. Files are exported to the folder defined by the Path parameter (defaulting to .\certificates if not specified).
To do this, run the script with the ExportCertificates switch. Other switches can be used in the same command:
-
The Path parameter is used to specify the folder containing the gateway certificate file (and possibly the CA file). If not specified, the default location of ".\certificates" is used.
-
The Force parameter can be used to replace files with the same names in the destination folder.
-
Use Password to provide the password that was used to create the certificate or CSR in the command line. If you do use Password, the script will prompt for it.
Example:
PS C:\> .\SecureChannelCertificateInstaller -ExportCertificates -Path ".\export_certs" -Password "StrongPwd#19!84$" -Force
You will received a security warning in PowerShell, type r or R to continue. If you do not supply a password in the script command, you will be prompted for one; fill it in to continue. The image below shows an example where the password was not supplied when running the script.

The result of this example is a new folder named export_certs created that contains the files to be backed up, or to be copied to another computer and imported to that computer's certificate stores.