Reputation: 165
I want to check the auditing status of the SQL server using the Azure CLI command.
I have SQL Server named 'dummy-sql' inside resource group 'group1'.
So According to this link, https://learn.microsoft.com/en-us/powershell/module/az.sql/get-azsqlserverauditing?view=azps-2.8.0
When I tried this Powershell command,
Get-AzureRmSqlServerAuditing -ResourceGroupName "group1" -ServerName "dummy-sql"
I got this error,
Get-AzureRmSqlServerAuditing: The term 'Get-AzSqlServerAuditing' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
How to resolve this error ?
Upvotes: 1
Views: 876
Reputation: 222582
Get-AzSqlServerAuditing is deprecated You need to use Get-AzSqlServerAudit
instead
Get-AzSqlServerAudit -ResourceGroupName "resourcegroup01" -ServerName "server01"
Read from here
Upvotes: 1