4.15 Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2'

1 votes

# Script the verification

# Get all storage accounts and their resource groups
$storageAccounts = Get-AzStorageAccount

# Loop through each storage account and check the minimum TLS version
foreach ($storageAccount in $storageAccounts) {
$name = $storageAccount.StorageAccountName
$resourceGroup = $storageAccount.ResourceGroupName

# Query the minimumTLSVersion field for each storage account
$tlsVersion = (Get-AzStorageAccount -ResourceGroupName $resourceGroup -Name $name).MinimumTlsVersion

# Display the results for those that do not have TLS v1.2 set at their minimum
if ($tlsVersion -ne "TLS1_2") {
[PSCustomObject]@{
Name = $name
ResourceGroup = $resourceGroup
MinimumTLSVersion = $tlsVersion
} | Format-Table -AutoSize
}
}

Done Benchmark Community Suggestion Suggested by: Filip Jodoin Upvoted: 17 Feb, '25 Comments: 1

Comments: 1
OldestNewestMost likesFewest likes