通过Azure CLI下载Azure安全建议

时间:2019-04-23 18:35:26

标签: azure azure-cli

我正在使用Azure CLI(az顾问建议列表)下载有关我的订阅的所有建议。我注意到的是,除安全建议外,它对所有建议都可以正常工作。对于安全建议,我总是得到:

"shortDescription": {
      "problem": "Improve the security of your Azure resources",
      "solution": "Follow Security Center recommendations"
    },

即使在Azure上这些建议都有具体的问题/解决方案(例如在子网上启用网络安全组) 我想,我需要使用另一个命令来获得具体的安全建议,但是我在文档中找不到任何内容。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

请使用az security task list

此外,如果要使用Powershell实现相同的功能,请使用以下ASC Powershell模块。提供了来自github的示例链接。

ASC Powershell模块:-https://www.powershellgallery.com/packages/AzureRM.Security/0.2.0-preview

ASC Powershell参考:-https://github.com/Azure/azure-powershell/blob/preview/src/ResourceManager/Security/Commands.Security/help/AzureRM.Security.md

ASC示例:-https://github.com/Microsoft/Azure-Security-Center/blob/master/quickstarts/ASC-Samples.ps1

请查看有关如何安装模块的博客。 https://blogs.technet.microsoft.com/germanageability/2018/09/04/installing-and-testing-the-new-azure-security-center-preview-cmdlets/

Get-AzureRmSecurityTask将为您提供针对应用策略的每种资源建议的建议类型的详细信息。

相关问题