Last active
December 17, 2021 21:37
-
-
Save MartinMiles/899927b64c1cd2180784d1f563cdcbbc to your computer and use it in GitHub Desktop.
On Windows 11, disables TLS 1.3 over TCP, and start Marketing Automation service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module WebAdministration; | |
$XConnectSiteName = "xconnect.dev.local"; # or any other IIS website you'd want to process | |
if($Params.WindowsBuild -ge 22000){ | |
Function ReplaceWebsiteBinding { | |
Param( | |
[string] $sitename, | |
[string] $oldBinding | |
); | |
$wsbindings = (Get-ItemProperty -Path "IIS:\Sites\$sitename" -Name Bindings) | |
for($i=0;$i -lt ($wsbindings.Collection).length;$i++){ | |
if((($wsbindings.Collection[$i]).bindingInformation).Contains($oldBinding)){ | |
($wsbindings.Collection[$i]).bindingInformation = $oldBinding; | |
($wsbindings.Collection[$i]).sslFlags=33 | |
} | |
} | |
Set-ItemProperty -Path "IIS:\Sites\$sitename" -Name Bindings -Value $wsbindings | |
# Get-ItemProperty -Path "IIS:\Sites\$sitename" -Name Bindings | |
} | |
ReplaceWebsiteBinding "$XConnectSiteName" "*:443:$XConnectSiteName" | |
Restart-WebAppPool "$XConnectSiteName" | |
Start-Service -Name "$XConnectSiteName-MarketingAutomationService" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment