Container soft delete is in preview, as such there is not a way to easily fetch this through scripting. As this feature is further developed I expect you will be able to more easily obtain this information. For the remainder of the information you can use the below PowerShell to get all the information for your subscription:
$context = Get-AzContext
$storageAccounts = Get-AzResource -ResourceType 'Microsoft.Storage/storageAccounts'
[System.Collections.ArrayList]$saUsage = New-Object -TypeName System.Collections.ArrayList
foreach ($storageAccount in $storageAccounts) {
$StorageAccountDetails = [ordered]@{
SubscriptionName = $context.Subscription.Name
SubscrpitionID = $context.Subscription.Id
StorageAccountName = $storageAccount.Name
ResourceGroup = $storageAccount.ResourceGroupName
Location = $storageAccount.Location
BlobPublicAccess = (Get-AzStorageAccount -ResourceGroupName $storageAccount.ResourceGroupName -Name $storageAccount.Name).AllowBlobPublicAccess
BlobSoftDelete = (Get-AzStorageBlobServiceProperty -ResourceGroupName $storageAccount.ResourceGroupName -StorageAccountName $storageAccount.Name).DeleteRetentionPolicy.Enabled
SecureTransferRequired = (Get-AzStorageAccount -ResourceGroupName $storageAccount.ResourceGroupName -Name $storageAccount.Name).EnableHttpsTrafficOnly
AllowAccessFrom = (Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $storageAccount.ResourceGroupName -AccountName $storageAccount.Name).DefaultAction
PrivateEndpoints = (Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $storageAccount.ResourceGroupName -AccountName $storageAccount.Name).VirtualNetworkRules
}
$saUsage.add((New-Object psobject -Property $StorageAccountDetails)) | Out-Null
}
$saUsage | Export-Csv -Path C:\Users\username\test.csv -NoTypeInformation
Please check to see if this works for you. If you have further questions or issues please let us know.
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.