The following command creates a test certificate issued by the default test root and writes it to testCert.cer.
The following command creates a certificate issued by the default test root and saves it to a certificate store.
makecert -ss testCertStore
The following command creates a certificate issued by the default test root and saves it to a certificate store. It explicitly places the certificate in the currentuser store.
makecert -ss testCertStore -sr currentuser
The following command creates a test certificate and writes it to textXYZ.cer, using the subject's key container and the certificate subject's X.500 name.
makecert -sk XYZ -n "CN=XYZ Company" testXYZ.cer
The following command creates a certificate issued by the default test root, creates a .pvk file, and outputs the certificate to both the store and the file.
makecert -sv testCert.pvk -ss testCertStore testCert.cer
The following command creates a certificate issued by the default test root, creates a key container, and outputs the certificate to both the store and the file.
makecert -sk myTestKey -ss testCertStore testCert.cer
The following command creates a self signed certificate, specifies a subject name of "CN=XYZ Company", specifies start end ending validity periods, places the key in the my store, specifies and exchange key, and makes the private key exportable.
makecert -r -pe -n "CN=XYZ Company" -b 01/01/2005 -e 01/01/2010 -sky exchange -ss my
The following commands create certificates and save them to stores. The first command creates a certificate using the default test root and saves the certificate to a store. The second command creates another certificate using the newly created certificate and saves the second certificate to another store.
makecert -sk myTestKey -ss testCertStore
makecert -is testCertStore -ss anotherTestStore
The following commands create certificates and save them to stores. The first command saves the certificate to the my store. The second command creates another certificate using the newly created certificate. Because there is more than one certificate in the my store, the second command identifies the first certificate using its common name.
makecert -sk myTestKey -n "CN=XXZZYY" -ss my
makecert -is my -in "XXZZYY" -ss anotherTestStore
The following commands create certificates and save them to files and stores. The first command creates a certificate using the default test root and saves the certificate to the my store and to a file. The second command creates another certificate using the newly created testCert.cer certificate. Because there is more than one certificate in the my store, the second command uniquely identifies the first certificate using the certificate file name.
makecert -sk myTestKey -n "CN=XXZZYY" -ss my testCert.cer
makecert -is my -ic testCert.cer -ss anotherTestStore