Skip to content

Instantly share code, notes, and snippets.

@altrive
Created May 6, 2014 17:09
Show Gist options
  • Save altrive/98521b2d8a2915ab5953 to your computer and use it in GitHub Desktop.
Save altrive/98521b2d8a2915ab5953 to your computer and use it in GitHub Desktop.
#Need to execute in Visual Studio command prompt context
#ClientCertificate EKU
makecert.exe -r -pe -a sha256 -n "CN=Azure Management Certificate" -ss My -len 2048 -sy 24 -e "01/01/2040" -eku 1.3.6.1.5.5.7.3.2 AzureManagementCertificate.cer >$null
$cert = Get-Childitem Cert:\CurrentUser\My | where Subject -like "*Azure Management Certificate*"
makecert.exe -r -pe -a sha256 -n "CN=*.cloudapp.net" -sky exchange -len 2048 -e "01/01/2040" -cy end -eku "1.3.6.1.5.5.7.3.1" -sv temp.pvk cloudapp.net.cer > $null
pvk2pfx.exe -pvk "temp.pvk" -spc "cloudapp.net.cer" -pfx "cloudapp.net.pfx" -po "Password!" -f
Remove-Item -Path "temp.pvk"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment