Photo by Pixabay

How to copy certificates between Azure Key Vaults

I recently had to copy a few certificates between Azure key vaults. These certificates were issued in one key vault but given access restrictions, they were consumed from another key vault. Note 1: copying certificates between key vaults is generally a bad idea as the copied certificate will not follow any automatic renewal setup for the original. The powershell script below was imported mostly from this StackOverflow answer. The primary change done was to use the X509Certificate2 class constructor instead of the Import method which is not recommended....

November 23, 2022 · 1 min · LPains