Export (0) Print
Expand All
Expand Minimize

Get-SCOMParentManagementServer

Updated: January 26, 2014

Applies To: System Center 2012 R2 Operations Manager

Get-SCOMParentManagementServer

Gets the management servers to which an agent reports.

Syntax

Parameter Set: FromAgent
Get-SCOMParentManagementServer [-Agent] <AgentManagedComputer[]> [ <CommonParameters>]

Parameter Set: FromGatewayManagementServer
Get-SCOMParentManagementServer [-GatewayServer] <ManagementServer[]> [ <CommonParameters>]




Detailed Description

The Get-SCOMParentManagementServer cmdlet retrieves the management servers to which an agent reports. In System Center 2012 – Operations Manager, primary and failover management servers provide redundancy for agents and gateway management servers.

Parameters

-Agent<AgentManagedComputer[]>

Specifies an array of one or more agent objects. For more information about how to get an agent object, type "Get-Help Get-SCAgent".


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-GatewayServer<ManagementServer[]>

Specifies an array of gateway management servers. To obtain a ManagementServer object, use the Get-SCOMManagementServer cmdlet.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Retrieve a list of management servers

This command retrieves the management servers to which the agent named Server01 reports.

The command in parentheses executes first and retrieves the agent named Server01. The cmdlet then uses the results of the command in parentheses as input to the Agent parameter.


PS C:\> Get-SCOMParentManagementServer -Agent (Get-SCAgent -Name "Server01.Contoso.com")

Example 2: Retrieve a list of management servers by wildcard

This example retrieves a list of management server for agent names that match a specific string.

The first command uses the Get-SCAgent cmdlet to get agents that begin with the string Server with a wildcard character. The cmdlet stores the agents in the $Agents variable.

The second command uses the Get-SCOMParentManagementServer cmdlet to get the management servers in the $Agents variable.


PS C:\> $Agents = "Server*.Contoso.com" | Get-SCAgentPS C:\> Get-SCOMParentManagementServer -Agent $Agents

Example 3: Retrieve a list of management server using pipes

This command passes the agent named Server01.Consoso.com to the Get-SCAgent cmdlet by using the pipeline operator, and then passes the output to the Get-SCOMParentManagementServer cmdlet.


PS C:\> "Server01.Contoso.com" | Get-SCAgent | Get-SCOMParentManagementServer

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft