Forum Discussion
BlogMI
Oct 24, 2024Copper Contributor
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 MCSB?
Reference table for all compute security recommendations in Microsoft Defender for Cloud - Microsoft Defender for Cloud | Microsoft Learn
- micheleariisSteel Contributor
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%20subscriptions- micheleariisSteel Contributor
BlogMI 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