Update netsh-cert-update.ps1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
$old="{OLD_THUMBPRINT}"
|
||||
$new="{NEW_THUMBPRINT}"
|
||||
$old="5df978393c6d7a5cd826a911d824322d4e7f6898"
|
||||
$new="391f6011610d4f3dfb8366455acb9ece00460846"
|
||||
|
||||
$oldN=($old -replace '\s','').ToLower()
|
||||
$newN=($new -replace '\s','').ToLower()
|
||||
@@ -62,11 +62,11 @@ foreach ($b in $targets) {
|
||||
}
|
||||
|
||||
Write-Host "Updating $($b.Binding)..."
|
||||
& netsh http delete sslcert $key | Out-Null
|
||||
& netsh http add sslcert $key `
|
||||
& netsh http delete sslcert $key
|
||||
& netsh http add sslcert $key `
|
||||
"certhash=$newN" `
|
||||
"appid=$($b.AppId)" `
|
||||
"certstorename=$($b.Store)" | Out-Null
|
||||
"certstorename=$($b.Store)"
|
||||
|
||||
Write-Host "Updated."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user