Makecert – Azure Management Certificates

I have created this article as a reference for myself when I need to create an Azure management certificate for various tasks such as setting up Azure automation for example.  I hope you find this useful too.

Tip:- if you regularly work with Azure then I would advise you install the SDK as soon as you can when you are on a good internet connection as it is ~300Mb. It’s worth having as part of your standard computer build.


Create and Upload an Azure Management Certificate

You will need a tool called Makecert and this is available as part of the Windows SDK available here.

You will need the Windows SDK so download the installer (less than 1Mb), run it and just select the top option.


Once installed  create the certificate via the command line.

I have used the script found on this blog which is every useful.

@echo off
echo This script will create an Azure certificate and export for use in Windows Azure.
echo Computer Name
echo %computername%
echo creating folder: %SystemDrive%\certs
mkdir %SystemDrive%\certs
cd certs
dir “C:\Program Files (x86)\Windows Kits\8.1\bin\x64” | findstr /i “makecert.exe”
echo creating cert and placing it in %SystemDrive%\certs
“C:\Program Files (x86)\Windows Kits\8.1\bin\x64\makecert.exe” -r -pe -n CN=%computername%-AzureCert -ss my -sr localmachine -eku -len 2048 -e 01/01/2016 automation-AzureCert.cer
goto end
echo makecert.exe file not found. Please check directory path above or download and install the Windows 8.1 SDK from
goto end

Create a .bat file with the above script or feel free to alter the dates etc.  Run it and the certificate is created.


The certificate is created in the C:\certs folder and imported into the machines personal certificate store.

To export a PFX file for possible later use export the certificate from MMC, Details tab of the certificate, Copy to File.


Click next on the first box,then select export private key.


Leave defaults and press next.


specify a password


Enter the location to save the file and exit.

You can now upload this certificate in the Azure portal, under settings, management certificates, upload.

Upload The Azure Management Certificate

Return to the Azure Portal and upload the management certificate.



I hope you found this useful.

Thanks for reading.


About Mitesh Chauhan
Mitesh Chauhan, Azure Cloud Solutions Architect. This is my blog where I share articles and thoughts on IT Infrastructure and architecture. The topics I am most passionate about are Implementation and architecture of rock solid Cloud Infrastructure based around SQL Server and Windows Server mainly using Microsoft Azure. MCTS - Azure Architecture MCTS - Azure Implementation MCSE Server Infrastructure (Windows Server 2012) , MCITP SQL Server 2008, Togaf Certified, Prince 2 Practitioner.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: