Last active
May 15, 2025 19:03
-
-
Save derektamsen/d8cc127927f7a21765dc68418a3e8b47 to your computer and use it in GitHub Desktop.
Create a self-signed certificate on windows and add it to the local machine certificate store. The generated certificate can only be used for webservers and does not include extensions for client usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Params = @{ | |
KeyAlgorithm = 'ECDSA_nistP256' | |
KeyUsage = 'DigitalSignature' | |
DnsName = $(hostname) | |
CertStoreLocation = 'cert:\LocalMachine\My' | |
TextExtension = @('2.5.29.37={text}1.3.6.1.5.5.7.3.1') | |
} | |
New-SelfSignedCertificate @Params -confirm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment