Forum Discussion
Microsoft Defender for Cloud compute recommendations
Is there a current offline copy in Excel format of all compute recommendations in Microsoft Defender for Cloud such as https://github.com/MicrosoftDocs/SecurityBenchmarks?
https://learn.microsoft.com/en-us/azure/defender-for-cloud/recommendations-reference-compute
3 Replies
BlogMI Hi, I hope this can help you: this script logs in to your Azure account, retrieves the security recommendations and exports them to a CSV file, which you can open with Excel
Connect-AzAccount
$recommendations = Get-AzSecurityRecommendation
$recommendations | Export-Csv -Path "DefenderForCloudRecommendations.csv" -NoTypeInformation
- BlogMICopper ContributorHi,
thanks for your help. I can't find the command Get-AzSecurityRecommendation . I can also export the security recommendations on the GUI.
In the meantime, I found this:
https://github.com/Azure/Microsoft-Defender-for-Cloud/tree/main/Powershell%20scripts/Export%20a%20list%20of%20recommendations%20for%20all%20subscriptionsBlogMI Hi, make sure you have the latest Az.Security module installed.
This module contains the cmdlets needed to interact with Microsoft Defender for Cloud.Install-Module -Name Az.Security -AllowClobber -Scope CurrentUser
Yes, as an alternative you can use https://github.com/Azure/Microsoft-Defender-for-Cloud/tree/main/Powershell%20scripts/Export%20a%20list%20of%20recommendations%20for%20all%20subscriptions