@SET CerFileName=MySelfSignedCert
@SET CN=%CerFileName%

REM ----------------------------------------------
@set makecert="makecert.exe"
@set pvk2pfx="pvk2pfx.exe"
%makecert% -n "CN=%CN%" %CerFileName%.cer -a sha1 -sv %CerFileName%.pvk -r -pe -sp "Microsoft Strong Cryptographic Provider" -sy 1 -sr localmachine -len 2048 -sky exchange
%pvk2pfx% -pvk %CerFileName%.pvk -spc %CerFileName%.cer -pfx %CerFileName%.pfx -f
pause
