Import-PfxCertificate
Import-PfxCertificate [-FilePath*] <String> [[-CertStoreLocation] <String>] [-Exportable] [-Password<SecureString>] [-Confirm] [-WhatIf] [<CommonParameters>]
The Import-PfxCertificate cmdlet imports certificates and private keys from a PFX file to the destination store. Certificates with and without private keys in the PFX file are imported, along with any external properties that are present.
Delegation may be required when using this cmdlet with Windows PowerShellr remoting and changing user configuration.
Parameters
-CertStoreLocation [<String>]
Specifies the path of the store to which certificates will be imported. If this parameter is not specified, then the current path is used as the destination store.
-Exportable [<SwitchParameter>]
Specifies whether the imported private key can be exported. If this parameter is not specified, then the private key cannot be exported.
-FilePath <String>
- This value is required
- Accepts pipeline input ByPropertyName
Specifies the path for the PFX file.
-Password [<SecureString>]
Specifies the password for the imported PFX file in the form of a secure string.
-Confirm [<SwitchParameter>]
- Default value is false
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.
-WhatIf [<SwitchParameter>]
- Default value is false
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.
Inputs
System.StringOutputs
System.Security.Cryptography.X509Certificates.X509Certificate2This work is licensed under a Creative Commons Attribution 4.0 International. It is attributed to Microsoft Corporation and can be found here.
PowerShell Commands