Import-KrCertificate
SYNOPSIS
Imports a PFX/PEM certificate file and returns X509Certificate2.
SYNTAX
__AllParameterSets
Import-KrCertificate [-FilePath] <string> [[-Password] <securestring>] [[-PrivateKeyPath] <string>]
[<CommonParameters>]
ALIASES
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION
The Import-KrCertificate function allows you to import a certificate into the Kestrun environment. This may include loading a certificate from a file or other source and adding it to the appropriate certificate store or configuration.
EXAMPLES
EXAMPLE 1
Import-KrCertificate -Path “C:\certs\mycert.pfx” -Password (ConvertTo-SecureString “password” -AsPlainText -Force) This example imports a certificate from the specified path using the provided password.
PARAMETERS
-FilePath
The path to the certificate file to import.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Password
The password for the certificate file, if applicable.
Type: System.Security.SecureString
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PrivateKeyPath
The path to the private key file, if applicable.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.Security.Cryptography.X509Certificates.X509Certificate2
{{ Fill in the Description }}
NOTES
This function is part of the Kestrun PowerShell module.
RELATED LINKS
{{ Fill in the related links here }}