Skip to content

Instantly share code, notes, and snippets.

@Legends
Last active December 19, 2019 18:44
Show Gist options
  • Select an option

  • Save Legends/5e6ffbedab2ed1ad1936fe7228c714f8 to your computer and use it in GitHub Desktop.

Select an option

Save Legends/5e6ffbedab2ed1ad1936fe7228c714f8 to your computer and use it in GitHub Desktop.
# https://docs.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate?redirectedfrom=MSDN&view=win10-ps#examples
# OPEN MMC --> CERTIFICATES (LOCAL COMPUTER)
# CREATES A CERTIFICATE IN: Local Computer | Personal | Certificates:
# where legends.io is setup as dns in hosts file as: --> 127.0.0.1 legends.io
#CREATE THE CERTIFICATE:
New-SelfSignedCertificate -DnsName "legends.io", "*.legends.io" -CertStoreLocation "cert:\LocalMachine\My"
# OPEN MMC --> CERTIFICATES (LOCAL COMPUTER)
# Local Computer | Personal | Certificates --> Right-Click the cert --> All Tasks --> Export:
# 1.) Yes, export private key --> Next
# 2.) Check "Export all etended properties" --> Next
# 3.) Enter password 2x
# 4.) Save as "SomeName.pfx"
# 5.) Go to: Local Computer | Trusted Root Certification Authorities | Certificates --> Import "SomeName.pfx"
# 6.) Go to your new website: Edit Bindings --> Select the legends.io certificate there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment