BACKUP CERTIFICATE
copies certificate key material out
What changes
- Input
- certificate key material
- Output or change
- backup device, file or URL
Syntax at a glance
BACKUP CERTIFICATE certname TO FILE = 'path_to_file' [ WITH [FORMAT = 'PFX',] PRIVATE KEY ( FILE = 'path_to_private_key_file' , ENCRYPTION BY PASSWORD = 'encryption_password' [ , DECRYPTION BY PASSWORD = 'decryption_password' ] ) ]
Work example
A certificate's private key needs a protected recovery copy.
Review the encrypted backup location, password custody, certificate expiry, and restore owner.
Check your work A lab instance imports the certificate and opens the data it protects.
Open Microsoft Learn for full syntax, permissions, and details for your version.