Connecting Azure Activity Log to Log Analytics instance using PowerShell
问题 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 outlined on this page: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/collect-activity-logs#configuration 回答1: You may use the PowerShell cmdlet New-AzureRmOperationalInsightsAzureActivityLogDataSource . Illustration: New-AzureRmOperationalInsightsAzureActivityLogDataSource -ResourceGroupName