Get-SCOMAgent

Get-SCOMAgent

Gets the agent-managed computers in a management group.

構文

Parameter Set: Empty
Get-SCOMAgent [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromAgentNames
Get-SCOMAgent [-DNSHostName] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromManagementServer
Get-SCOMAgent [-ManagementServer] <ManagementServer> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

詳細説明

The Get-SCOMAgent cmdlet gets the agent-managed computers in a management group. You can specify the DNSHostName parameter to get the agent-managed computers on a Domain Name System (DNS) host, or you can specify the ManagementServer parameter to get all the child agent-managed computers for a primary management server.

パラメーター

-ComputerName<String[]>

Specifies an array of names of computers. You can use NetBIOS names, IP addresses, or fully qualified domain names (FQDNs). To specify the local computer, type the computer name, localhost, or a dot (.).

The System Center Data Access service must be running on the computer. If you do not specify a computer, the cmdlet uses the computer for the current management group connection.

エイリアス

なし

必須?

false

位置は?

named

既定値

localhost

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

true (ByValue)

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

false

-Credential<PSCredential>

Specifies a PSCredential object for the management group connection. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

If you specify a computer in the ComputerName parameter, use an account that has access to that computer. The default is the current user.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

true (ByValue)

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

false

-DNSHostName<String[]>

Specifies the name of a Domain Name System (DNS) host of the agent-managed computer.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

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

true (ByValue, ByPropertyName)

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

false

-ManagementServer<ManagementServer>

Specifies a ManagementServer object. This parameter specifies the primary management server from which to retrieve all child agents. To obtain a ManagementServer object, use the Get-SCOMManagementServer cmdlet.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

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

true (ByValue, ByPropertyName)

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

false

-SCSession<Connection[]>

Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCOMManagementGroupConnection cmdlet.

A connection object represents a connection to a management server. The default is the current management group connection.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

true (ByValue)

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

false

<CommonParameters>

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

入力

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

出力

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

  • Microsoft.EnterpriseManagement.Administration.AgentManagedComputer

Example 1: Get all agents in the management group

This command establishes a temporary connection with the computer named Server01 and gets all agents in the management group.

PS C:\> Get-SCOMAgent -ComputerName "Server01.Contoso.Com"

Example 2: Get the agents managed by a management server

This example gets agent-managed computers that are managed by a management server.

The first command gets the management server object named MgmtServer01.Contoso.com and stores the object in the $MgmtServer variable.

The second command gets the agents that are managed by the management server stored in $MgmtServer.

PS C:\> $MgmtServer = Get-SCOMManagementServer "MgmtServer01.Contoso.com"
PS C:\> Get-SCOMAgent -ManagementServer $MgmtServer

Example 3: Get agents in a management group by using the agent name

This command gets agents that are named server01.contoso.com, that have a name that begins with Server02, and that are in the Contoso.com domain.

PS C:\> Get-SCOMAgent -DNSHostName "server01.contoso.com", "Server02*", "*.Contoso.com"

Example 4: Get all agents in a domain

This command establishes a temporary connection with the computer named Server01.Contoso.com and gets all agents in the Contoso.com domain.

PS C:\> Get-SCOMAgent -DNSHostName "*.Contoso.com" -ComputerName "Server01.Contoso.com"

関連トピック

Install-SCOMAgent

Uninstall-SCOMAgent

Repair-SCOMAgent

Get-SCOMAgent