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.