Update netsh-cert-update.ps1

This commit is contained in:
2026-01-13 16:49:42 +00:00
parent 7f3ac24ae0
commit eb925e705b

View File

@@ -1,5 +1,5 @@
$old="{OLD_THUMBPRINT}" $old="5df978393c6d7a5cd826a911d824322d4e7f6898"
$new="{NEW_THUMBPRINT}" $new="391f6011610d4f3dfb8366455acb9ece00460846"
$oldN=($old -replace '\s','').ToLower() $oldN=($old -replace '\s','').ToLower()
$newN=($new -replace '\s','').ToLower() $newN=($new -replace '\s','').ToLower()
@@ -62,11 +62,11 @@ foreach ($b in $targets) {
} }
Write-Host "Updating $($b.Binding)..." Write-Host "Updating $($b.Binding)..."
& netsh http delete sslcert $key | Out-Null & netsh http delete sslcert $key
& netsh http add sslcert $key ` & netsh http add sslcert $key `
"certhash=$newN" ` "certhash=$newN" `
"appid=$($b.AppId)" ` "appid=$($b.AppId)" `
"certstorename=$($b.Store)" | Out-Null "certstorename=$($b.Store)"
Write-Host "Updated." Write-Host "Updated."
} }