* For Windows 7 make sure you open a privileged command window from Visual Studio developer command prompt, e.g. Developer Command Prompt for VS2013 .
Examples
makecert -pe -n “CN=Test Certificate” -ss My -sr CurrentUser -a sha1 -sky signature -r “TestCert.cer”
-pe: private key exportable
-n: Subject name
-ss: Store name
-sr: Store location. CurrentUser (the default) or LocalMachine
-a: Signature algorithm. MD5 (the default) or sh1.
-sky: Key type. Must be signature or exchange.
-r: self signed
Reference
makecert.exe