-
-
Save martin77s/d22f5a930c04a5f10e306de09605653b to your computer and use it in GitHub Desktop.
Set the minimum TLS version to 1.2 on all Azure WebApps
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
# Login to Azure | |
Add-AzureRmAccount | |
# Iterate all sites and set the Minimum TLS version to 1.2 (SSL Settings) | |
Get-AzureRmResource -ResourceType Microsoft.Web/sites | ForEach-Object { | |
$params = @{ | |
ApiVersion = '2018-02-01' | |
ResourceName = '{0}/web' -f $_.Name | |
ResourceGroupName = $_.ResourceGroupName | |
PropertyObject = @{ minTlsVersion = 1.2 } | |
ResourceType = 'Microsoft.Web/sites/config' | |
} | |
Set-AzureRmResource @params -Force | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment