Garima
Garima

Reputation: 441

Fetch all resources which send data to a particular log analytics workspace?

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

Answers (1)

Sajeetharan
Sajeetharan

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

Related Questions