Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
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.
Backs up a computer certificate - useful for older systems and backing up remote certs to local disk.
Backs up a computer certificate - useful for older systems and backing up remote certs to local disk.
Backup-DbaComputerCertificate
[[-SecurePassword] <SecureString>]
[-InputObject] <Object[]>
[[-Path] <String>]
[[-FilePath] <String>]
[[-Type] <String>]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaComputerCertificate | Backup-DbaComputerCertificate -Path C:\temp
Backs up all certs to C:\temp. Auto-names the files.
PS C:\> Get-DbaComputerCertificate -Thumbprint 29C469578D6C6211076A09CEE5C5797EEA0C2713 | Backup-DbaComputerCertificate -FilePath C:\temp\29C469578D6C6211076A09CEE5C5797EEA0C2713.cer
Backs up certificate with the thumbprint 29C469578D6C6211076A09CEE5C5797EEA0C2713 to the temp directory.
The target certificate object. Accepts input from Get-DbaComputerCertificate.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Export using a password
Alias | Password |
Required | False |
Pipeline | false |
Default Value |
Export to a directory
Alias | |
Required | False |
Pipeline | false |
Default Value | $pwd |
Export to a specific file name
Alias | |
Required | False |
Pipeline | false |
Default Value |
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 |
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 |