Skip to content

Instantly share code, notes, and snippets.

@martin77s
Created August 2, 2018 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martin77s/d22f5a930c04a5f10e306de09605653b to your computer and use it in GitHub Desktop.
Save martin77s/d22f5a930c04a5f10e306de09605653b to your computer and use it in GitHub Desktop.
Set the minimum TLS version to 1.2 on all Azure WebApps
# 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