Install-PfxCertificate
This PowerShell cmdlet installs a certificate from a .pfx, .crt, or .cer file into the certificate store. If the file is a .pfx, the private key is installed with the certificate. By default, the cmdlet installs the certificate in the Root store of the CurrentUser location. This cmdlet is commonly used to deploy certificates for NCache TLS/SSL configuration.
Note
This cmdlet is available on Linux only.
Install-PfxCertificate -FilePath [-Password] \
[-StoreName] [-StoreLocation] \
[-NoLogo]
Examples
- This cmdlet installs the .pfx certificate, together with its private key, in the Root store of the CurrentUser location. These are the default store settings.
Install-PfxCertificate -FilePath "/path/to/mycert.pfx" -Password "pass123"
- This cmdlet installs a certificate from a .cer file in the My store of the LocalMachine location.
Install-PfxCertificate -FilePath "/path/to/rootca.cer" -StoreName My -StoreLocation LocalMachine
Properties
Note
The parameter with an asterisk (*) in its name is required, and the remaining parameters are optional.
| Parameters | Data Types | Description | Default Value |
|---|---|---|---|
-FilePath* |
<String> |
Specifies the path to the certificate file. Supported file types are .pfx, .crt, and .cer. | - |
-Password |
<String> |
Specifies the password for the .pfx file. This parameter is required when the file is password-protected. | - |
-StoreName |
<String> |
Specifies the target certificate store. Valid values are My and Root. |
Root |
-StoreLocation |
<String> |
Specifies the certificate store location. Valid values are CurrentUser and LocalMachine. |
CurrentUser |
-NoLogo |
<SwitchParameter> |
Suppresses the display of the logo banner. | False |