commands

^

Backup-DbaComputerCertificate

Author Chrissy LeMaire (@cl), netnerds.net
Availability Windows only

 

Synopsis

Backs up a computer certificate - useful for older systems and backing up remote certs to local disk.

Description

Backs up a computer certificate - useful for older systems and backing up remote certs to local disk.

Syntax

Backup-DbaComputerCertificate
    [[-SecurePassword] <SecureString>]
    [-InputObject] <Object[]>
    [[-Path] <String>]
    [[-FilePath] <String>]
    [[-Type] <String>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaComputerCertificate | Backup-DbaComputerCertificate -Path C:\temp

Backs up all certs to C:\temp. Auto-names the files.

Example: 2
PS C:\> Get-DbaComputerCertificate -Thumbprint 29C469578D6C6211076A09CEE5C5797EEA0C2713 | Backup-DbaComputerCertificate -FilePath C:\temp\29C469578D6C6211076A09CEE5C5797EEA0C2713.cer

Backs up certificate with the thumbprint 29C469578D6C6211076A09CEE5C5797EEA0C2713 to the temp directory.

Required Parameters

-InputObject

The target certificate object. Accepts input from Get-DbaComputerCertificate.

Alias
Required True
Pipeline true (ByValue)
Default Value

Optional Parameters

-SecurePassword

Export using a password

Alias Password
Required False
Pipeline false
Default Value
-Path

Export to a directory

Alias
Required False
Pipeline false
Default Value $pwd
-FilePath

Export to a specific file name

Alias
Required False
Pipeline false
Default Value
-Type

Export type. Options include: Authenticode, Cert, Pfx, Pkcs12, Pkcs7, SerializedCert.

Alias
Required False
Pipeline false
Default Value Cert
Accepted Values Authenticode,Cert,Pfx,Pkcs12,Pkcs7,SerializedCert
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False

 

Want to see the source code for this command? Check out Backup-DbaComputerCertificate on GitHub.
Want to see the Bill Of Health for this command? Check out Backup-DbaComputerCertificate.