Skip to content

Instantly share code, notes, and snippets.

@sumitsaiwal
Last active January 31, 2018 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumitsaiwal/5dcf92eebe98e216f94dd32f681d626b to your computer and use it in GitHub Desktop.
Save sumitsaiwal/5dcf92eebe98e216f94dd32f681d626b to your computer and use it in GitHub Desktop.
powershell command used to create certificates for point to site connectivity
root
$cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature `
-Subject "CN=P2SRootCert" -KeyExportPolicy Exportable `
-HashAlgorithm sha256 -KeyLength 2048 `
-CertStoreLocation "Cert:\CurrentUser\My" -KeyUsageProperty Sign -KeyUsage CertSign
Client
New-SelfSignedCertificate -Type Custom -KeySpec Signature `
-Subject "CN=P2SChildCert" -KeyExportPolicy Exportable `
-HashAlgorithm sha256 -KeyLength 2048 `
-CertStoreLocation "Cert:\CurrentUser\My" `
-Signer $cert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment