< Back

Backup-DbaComputerCertificate

Mon Jan 13, 2020 9:13 am

NAME Backup-DbaComputerCertificate



SYNOPSIS

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





SYNTAX

Backup-DbaComputerCertificate [[-SecurePassword] <Securestring>] [-InputObject] <System.Object[]> [[-Path]

<String>] [[-FilePath] <String>] [[-Type] <String>] [-EnableException <Switch>] [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-EnableException [<Switch>]

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.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-FilePath [<String>]

Export to a specific file name



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-InputObject [<System.Object[]>]

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



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Path [<String>]

Export to a directory



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-SecurePassword [<Securestring>]

Export using a password



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Type [<String>]

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



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Tags: Certificate

Author: Chrissy LeMaire (@cl), netnerds.net



Website: https://dbatools.io

Copyright: (c) 2018 by dbatools, licensed under MIT

License: MIT https://opensource.org/licenses/MIT



-------------------------- 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.



RELATED LINKS