Install-SCOMAgent

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Install-SCOMAgent

Deploys one or more System Center Management agents using push install.

Syntax

Parameter Set: Empty
Install-SCOMAgent -DNSHostName <String> -PrimaryManagementServer <ManagementServer> [-ActionAccount <PSCredential> ] [-AgentActionAccount <PSCredential> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Install-SCOMAgent cmdlet deploys one or more System Center Operations Manager agents using push install.

Parameters

-ActionAccount<PSCredential>

Specifies the credentials under which the deployment task will run. If this parameter is omitted or has a null value, the default action account of the management server that will manage the agent is used.

This is not the action account that the agent will use after it is installed on the computer. By default, the action account the agent will use is set to Local System, but can be changed using the AgentActionAccount parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AgentActionAccount<PSCredential>

Specifies the action account that the agent will use after it is installed on a computer. If this parameter is omitted, the Local System account is used. Enter a variable that represents an action account, or type a command that gets the action account. For information about how to get action accounts, type Get-Help Get-SCOMRunAsAccount.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PrimaryManagementServer<ManagementServer>

Specifies the primary management server for the agent. Enter a variable that represents the management server, or type a command that gets the management server.

For information about how to get a management server object, type Get-Help Get-SCOMManagementServer.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DNSHostName<String>

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

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

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

The first command gets the management server named "MgmtServer01.Contoso.com" and stores it in the $PrimaryMgmtServer variable.

The second command installs an agent on Server01.Contoso.com, and sets its primary management server to the management server stored in the $PrimaryMgmtServer variable.

PS C:\>$PrimaryMgmtServer = Get-SCOMManagementServer -Name "MgmtServer01.Contoso.com"
PS C:\>Install-SCOMAgent -Name "Server01.Contoso.com" -PrimaryManagementServer $PrimaryMgmtServer

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

The first command prompts the user for credentials and stores them in the $InstallAccount variable.

The second command gets the management server named "MgmtServer01.Contoso.com" and stores it in the $PrimaryMgmtServer variable.

The third command installs an agent on Server01.Contoso.com using the credentials supplied in the $InstallAccount varialbe, and sets the primary management server for the agent to the management server stored in the $PrimaryMgmtServer variable.

PS C:\>$InstallAccount = Get-Credential
PS C:\>$PrimaryMgmtServer = Get-SCOMManagementServer -Name "MgmtServer01.Contoso.com"
PS C:\>Install-SCOMAgent -Name "Server01.Contoso.com" -PrimaryManagementServer $PrimaryMgmtServer -ActionAccount $InstallAccount

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

The first command stores the name of three computers in the $Agents variable.

The second command prompts the user for credentials and stores them in the $InstallAccount variable.

The third command prompts the user for a password for a user account named ActionAccount in the Contoso domain and stores the credentials in the $AgentActionAccount variable.

The fourth command gets the management server named "MgmtServer01.Contoso.com" and stores it in the $PrimaryMgmtServer variable.

The fifth command installs an agent on the three computers using the credentials supplied in the $InstallAccount variable, sets the primary management server for the agent to the management server stored in the $PrimaryMgmtServer variable, and sets the agent action account to the ActionAccount user.

PS C:\>$Agents = "DC1.contoso.com","DC2.contoso.com","DC3.contoso.com"
PS C:\>$InstallAccount = Get-Credential
PS C:\>$AgentActionAccount = Get-Credential Contoso\ActionAccount
PS C:\>$PrimaryMgmtServer = Get-SCOMManagementserver -Name MgmtServer01.contoso.com
PS C:\>$Install-SCOMAgent -Name $Agents -PrimaryManagementServer $PrimaryMgmtServer -ActionAccount $InstallAccount -AgentActionAccount $AgentActionAccount -Confirm

Get-SCOMRunAsAccount

Get-SCOMAgent

Get-SCOMManagementServer

Uninstall-SCOMAgent