This is the Export step in the process of generating and uploading self-signed Root and client certificates to Azure for authentication for a Point-to-Site VPN Gateway. The PowerShell to create the root and client certificates is found here.

After creating the self-signed root certificate, it must be exported so it can be uploaded to Azure for the P2S configuration. It is only necessary to export the generated client certificate if it is to be installed on another client/computer. It is automatically installed on the client/computer it was generated from. Instructions are given here for exporting both the .cer file and the client certificate.

Export .cer file from Root Certificate
Export Client Certificate


To Export .cer file from Root Certificate:

1. To access the certificate manager Run > certmgr.msc  

2. Navigate to Personal > Certificates > Root Certificate > R-click > All Tasks > Export 

3. This will Open the Certificate Export Wizard > Next:

4. On the Export Private Key page, select No, do not export the private key > Next:

5. On the Export File Format page, select Base-64 encoded X.509 (.CER) > Next

6. On the File to Export page, select Browse > set location and name of the .cer file > Next:

7. To complete the .cer file export > Finish

8. Import successful:

9. Open the exported certificate in NotePad & the highlighted section below is the text that will be uploaded for Azure P2S Configuration/Authentication:

To Export the client certificate:

1. To access the certificate manager Run > certmgr.msc  

2. Navigate to Personal > Certificates > Child Certificate > R-click > All Tasks > Export: 

3. This will Open the Certificate Export Wizard > Next:

4. On the Export Private Key page, select Yes, export the private key > Next:

5. On the Export File Format page, select Personal Information Exchange and Include all certificates in the certification path if possible and Enable certificate privacy > Next:

6. On the Security page, add and confirm the password for the pfx file (store this somewhere!) > Next:

7. On the File to Export page, select Browse > set location and name of the .pfx file > Next

8. To complete the .pfx file export > Finish:

9. Import is successful:

10. Continue with the P2S configuration steps