Because I am not allowed to enable Microsoft Defender for SQL from Azure Portal, I am tring to find a Powershell or AzureCLI command to enable it from CloudShell. The final step is to use that command in a pipeline. I am expecting to be a command that get as parameters the name of the server and the group and automatically enable the Microsoft Defender for SQL.
I tried this:
az sql server threat-policy update –resource-group –server-name –state Enabled
The answer was: ‘threat-policy’ is misspelled or not recognized by the system.