{"id":32578402,"url":"https://github.com/thordreier/certificatetools","last_synced_at":"2026-06-30T20:31:34.555Z","repository":{"id":174641218,"uuid":"444006466","full_name":"thordreier/CertificateTools","owner":"thordreier","description":"PowerShell functions for making SSL binding changes easier","archived":false,"fork":false,"pushed_at":"2022-02-03T12:43:36.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T14:57:57.737Z","etag":null,"topics":["certificate","powershell","powershell-module","ssl"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/CertificateTools/","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thordreier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-03T09:32:18.000Z","updated_at":"2022-04-28T11:08:57.000Z","dependencies_parsed_at":"2023-07-09T19:00:31.084Z","dependency_job_id":null,"html_url":"https://github.com/thordreier/CertificateTools","commit_stats":null,"previous_names":["thordreier/certificatetools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thordreier/CertificateTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thordreier%2FCertificateTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thordreier%2FCertificateTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thordreier%2FCertificateTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thordreier%2FCertificateTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thordreier","download_url":"https://codeload.github.com/thordreier/CertificateTools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thordreier%2FCertificateTools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34983170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certificate","powershell","powershell-module","ssl"],"created_at":"2025-10-29T14:56:38.373Z","updated_at":"2026-06-30T20:31:34.548Z","avatar_url":"https://github.com/thordreier.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CertificateTools\n\nPowerShell functions for making SSL binding changes easier.\n\n## Usage\n\n### Examples\n\n```powershell\n############################ Find-NewestCertificate ############################\n\n# Find the certificate with thumbprint D568.. from Cert:\\LocalMachine\\My\n# Take the common name from that certificate\n# Find the newest certificate, with the same common name, in Cert:\\LocalMachine\\My.\n#   (This certificate can be D568.., if that is already the newest)\nFind-NewestCertificate -CertificateHash D5681CB21FC812AF764F5FB491DA6430C9EA73A9\n\n# Find the newest certificate with CN=*.foobar.tld that has a private key\nFind-NewestCertificate -CommonName '*.foobar.tld' -Path Cert:\\LocalMachine\\WebHosting -HasPrivateKey\n\n# 75e0... should be a root certificate with CN=GlobalSign that expire in 2021\n# It should return a certificate with same CN that expire in 2029 with thumbprint D69B...\n#   (at least on some computers)\nGet-Item -Path Cert:\\LocalMachine\\Root\\75e0abb6138512271c04f85fddde38e4b7242efe | Find-NewestCertificate\n\n\n\n############################### Get-HttpsBinding ###############################\n\n#Get all SSL bindings - it's \"netsh http show sslcert\" wrapped in some PowerShell\nGet-HttpsBinding\n# Returns something like\n# Binding                   CertificateHash                            Expire     Application   Subject\n# -------                   ---------------                            ------     -----------   -------\n# example1.foobar.tld:443   0123456789abcdef0123456789abcdef01234567   5/4/2022   IIS           CN=example1.foobar.tld\n# example2.foobar.tld:443   fedcba9876543210fedcba9876543210fedcba98   5/4/2022   IIS           CN=example2.foobar.tld\n\n# Format list will show more info\nGet-HttpsBinding | Format-List\n# Returns something like\n# Binding               : example1.foobar.tld:443\n# IpPort                :\n# HostnamePort          : example1.foobar.tld:443\n# CertificateHash       : 0123456789abcdef0123456789abcdef01234567\n# ApplicationId         : 4dc3e181-e14b-4a21-b022-59fc669b0914\n# CertificateStoreName  : WebHosting\n# ...\n# ...\n\n# Get all bindings that use TCP port 443\nGet-HttpsBinding -Port 443\n\n# Get all bindings that use a specific SSL certificate\ndir Cert:\\LocalMachine\\My\\1234FBC46BB66309EBD861BE4F95062B7C9E5E61 | Get-HttpsBinding\n\n# Get SSL bindings and find IIS bindings (requires that IIS PowerShell tools are installed)\nGet-HttpsBinding | Get-WebBinding\n\n# Get IIS bindings and find SSL bindings (requires that IIS PowerShell tools are installed)\nGet-WebBinding | Get-HttpsBinding\n\n\n\n############################### Set-HttpsBinding ###############################\n\n# Replace certificates on all bindings where a newer certificate is found (same CN).\n# But don't actuall run netsh - only show what would have run\nSet-HttpsBinding -ReplaceAllWithNewest -DryRun\n\n# Update binding on 0.0.0.0:443 with certificate with thumbprint 1234...\nSet-HttpsBinding -IpPort 0.0.0.0:443 -CertificateHash '1234fbc46bb66309ebd861be4f95062b7c9e5e61'\n\n# Change all binding that use 4321... to 1234...\nSet-HttpsBinding -OldCertificateHash '4321fbc46bb66309ebd861be4f95062b7c9e5e61' -CertificateHash '12341cb21fc912af764f5fb491da6430c9ea73a8'\n\n# Change all binding on TCP port 443399 to certificate with hash 1234...\nGet-HttpsBinding -Port 44399 | Set-HttpsBinding -CertificateHash '1234fbc46bb66309ebd861be4f95062b7c9e5e61'\n\n# Import foobar.pfx to certificate store (and make private key exportable)\n# and change binding on www.foobar.tld:443 to use that certificate\nSet-HttpsBinding -HostnamePort 'www.foobar.tld:443' -PfxPath 'foobar.pfx' -Exportable -PasswordClear 'Password1!'\n\n```\n\nExamples are also found in [EXAMPLES.ps1](EXAMPLES.ps1).\n\n### Functions\n\nSee [FUNCTIONS.md](FUNCTIONS.md) for documentation of functions in this module.\n\n## Install\n\n### Install module from PowerShell Gallery\n\n```powershell\nInstall-Module CertificateTools\n```\n\n### Install module from source\n\n```powershell\ngit clone https://github.com/thordreier/CertificateTools.git\ncd CertificateTools\ngit pull\n.\\Build.ps1 -InstallModule\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthordreier%2Fcertificatetools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthordreier%2Fcertificatetools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthordreier%2Fcertificatetools/lists"}