To create your own self-signed management certificate you can use makecert.exe, a command line tool that ships with Visual Studio

Create a Certificate using makecert.exe

Windows Azure Management Certificates

The makecert.exe command line tool ships with the Windows SDK for Windows 7 and is also part of the Visual Studio install. Open a Developer or Visual Studio Command Prompt window with Administrator rights and type the following command:

makecert -sky exchange -r -n "CN=[CertificateName]" -pe -a sha1 -len 2048 -ss My "[CertificateName].cer"

makecert -sky exchange -r -n "CN=SnapAzureCertificate" -pe -a sha1 -len 2048 -ss My "SnapAzureCertificate.cer"

Replace [CertificateName], including the brackets, with a name that will make sense to you. When you execute this a certificate will be generated. The full certificate will be placed within the default Personal certificate store, and a public key will be written out to a .cer file in the current directory of the command prompt. If you see an “Error: WriteFile failed => 0x5 (5)” as a result of running the command you need to restart the console with Administrator rights.

 Ling to source documentation...

Windows Azure Management Certificates

Uploading a .cer file to Windows Azure

Once you have the .cer file which contains the public key, you need to upload it to the Windows Azure Management Portal. Open a browser and go to the portal: http://manage.windowsazure.com. Once you sign in, select the Settings tab on the far bottom of the left side of the portal, then click on Management Certificates.

If you remove the "c:\cert\servername.cer", you will success. Like this:
makecert -sky exchange -r -n "CN=servername.com" -pe -a sha1 -len 2048 -ss my

If you run tool as administrator, you may have permission to set the “outputCertificateFile”,like this:
makecert -sky exchange -r -n "CN=servername.com" -pe -a sha1 -len 2048 -ss my servername.cer
It will store your certificates in your certificate storage. After generated the certificate, if you want to export and view the certificate file, you may need to use MMC.

 

Author: Chester Bryndza

  • Author image
    Published: Thursday, October 17, 2019
    Scope: Restricted
    Tag: AZURE