Reputation: 441
Is there a way to see all resources sending logs to a log analytics workspace using powershell? I am able to find a method names Get-AzureRmOperationalInsightsDataSource
but it accepts Name
as a parameter which is mandatory while I want to fetch all resources irrespective of name.
Upvotes: 2
Views: 1548
Reputation: 222722
Here the source is not a resource itself, its where you want to get the data from. so you can find all the resources
$dataSources = Get-AzOperationalInsightsDataSource -Workspace $workspace -Kind AzureActivityLog
Upvotes: 2