Connecting Azure Activity Log to Log Analytics instance using PowerShell

后端 未结 1 490
时光说笑
时光说笑 2021-01-15 20:34

Is there a way to configure Azure Activity logs to be forwarded to a Log Analytics instance using PowerShell? Essentially the same that can be performed using the Portal as

1条回答
  •  不思量自难忘°
    2021-01-15 21:15

    You may use the PowerShell cmdlet New-AzureRmOperationalInsightsAzureActivityLogDataSource.

    Illustration:

    New-AzureRmOperationalInsightsAzureActivityLogDataSource -ResourceGroupName  -WorkspaceName  -Name  -SubscriptionId 
    

    For more information refer https://docs.microsoft.com/en-us/powershell/module/azurerm.operationalinsights/New-AzureRmOperationalInsightsAzureActivityLogDataSource?view=azurermps-6.13.0

    Hope this helps!!

    0 讨论(0)
提交回复
热议问题