Update netsh-cert-update.ps1
This commit is contained in:
@@ -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."
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user