Skip to content

Commit

Permalink
Update Get-ResourceGroupActiveMS.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Drumm authored Mar 13, 2021
1 parent 85beedb commit 15b0ff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Powershell/Get-ResourceGroupActiveMS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ $ServerName = 'SQL1,10433'
$DBName = 'OperationsManager'
$ResourcePoolName = 'Linux' # This can contain part of the string for the Resource Pool Name.
$query = "select BaseManagedEntity.DisplayName ,cs.agent.AgentGuid ,cs.WorkFlowExecutionLocationAgent.AgentRowId ,cs.workflowexecutionlocation.WorkflowExecutionLocationRowId ,cs.workflowexecutionlocation.DisplayName from cs.WorkFlowExecutionLocationAgent inner join cs.workflowexecutionlocation ON cs.WorkFlowExecutionLocationAgent.WorkFlowExecutionLocationAgentRowId = cs.workflowexecutionlocation.WorkflowExecutionLocationRowId inner join CS.agent ON CS.agent.AgentRowId=cs.WorkFlowExecutionLocationAgent.AgentRowId inner join BaseManagedEntity ON BaseManagedEntity.BaseManagedEntityId = CS.agent.AGentGuid where cs.workflowexecutionlocation.DisplayName like '%$ResourcePoolName%'"
Invoke-SqlCommand -UseWindowsAuthentication -Server "SQL1,10433" -Database $DBName -Query $query
Invoke-SqlCommand -UseWindowsAuthentication -Server $ServerName -Database $DBName -Query $query

0 comments on commit 15b0ff8

Please sign in to comment.