Get-SCOMParentManagementServer

Get-SCOMParentManagementServer

Gets the management servers to which an agent reports.

構文

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

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

詳細説明

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.

パラメーター

-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".

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-GatewayServer<ManagementServer[]>

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

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

true (ByValue, ByPropertyName)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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-SCAgent
PS 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

関連トピック

Set-SCOMParentManagementServer