Closed
Description
Description
Running the PowerShell command to configure auditing generated an error. The same command works in version 4.1.0 of Az.sql.
Set-AzSqlServerAudit -ResourceGroupName "myrg" -ServerName "myserver" -LogAnalyticsTargetState Enabled -WorkspaceResourceId "/subscriptions/xxxxxxxxxx/resourcegroups/myrg/providers/microsoft.operationalinsights/workspaces/mywsnamehere
The error states that Workspace resource id not provided.
Issue script & Debug output
The error states that Workspace resource id not provided.
Environment data
Name Value
---- -----
PSVersion 5.1.19041.2364
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2364
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
cript 2.11.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault...}
Script 4.2.0 Az.Sql {Add-AzSqlDatabaseToFailoverGroup, Add-AzSqlElasticJobStep, Add-AzSqlElasticJobTarget, Add-AzSqlInstanceKeyVaultKey...}
Error output
The error states that Workspace resource id not provided.
Activity