Skip to content

Commit 15b0ff8

Browse files
author
Blake Drumm
authored
Update Get-ResourceGroupActiveMS.ps1
1 parent 85beedb commit 15b0ff8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Powershell/Get-ResourceGroupActiveMS.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ $ServerName = 'SQL1,10433'
4747
$DBName = 'OperationsManager'
4848
$ResourcePoolName = 'Linux' # This can contain part of the string for the Resource Pool Name.
4949
$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%'"
50-
Invoke-SqlCommand -UseWindowsAuthentication -Server "SQL1,10433" -Database $DBName -Query $query
50+
Invoke-SqlCommand -UseWindowsAuthentication -Server $ServerName -Database $DBName -Query $query

0 commit comments

Comments
 (0)