Warm tip: This article is reproduced from serverfault.com, please click

How to enable az security assessment on azure cli

发布于 2020-12-09 13:06:57

I am attempting to use az security assessment as described here, Azure Security Module

When I attempt to use it I see:

~$ az security assessment
az security: 'assessment' is not in the 'az security' command group. See 'az security --help'. If the command is from an extension, please make sure the corresponding extension is installed. To learn more about extensions, please visit https://docs.micro
soft.com/en-us/cli/azure/azure-cli-extensions-overview

I have looked at that page, and while it tells me how to generally install extensions, nowhere can I find how to install whatever extension the assessment module might be in.

Has anyone used this and can point me in the right direction for getting it installed? I've looked at the list-available and nothing stands out as a security assessment.

Questioner
Jason Shive
Viewed
0
4,473 2021-04-03 12:17:14

I was able to run az security assessment list command and got the result like this:

enter image description here

enter image description here

I have below softwares installed:

  1. Microsoft Azure CLI - 2.10.1
  2. Microsoft Azure Powershell - 5.7.0.18831

As Ian Kemp mentioned above, you can also try installing Az.Security.