Install-SCXAgent

Installs the Operations Manager agent for discovered UNIX and Linux computers.

Syntax

Install-SCXAgent
       -DiscoveryResult <DiscoveryResult[]>
       [-SCSession <Connection[]>]
       [-ComputerName <String[]>]
       [-Credential <PSCredential>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Install-SCXAgent cmdlet installs the Operations Manager agent for discovered UNIX and Linux computers, signs the certificate for WS-Management communication, and registers the agent with Operations Manager for management. UNIX and Linux computers should be discovered with the Invoke-SCXDiscovery cmdlet. The output object of the Invoke-SCXDiscovery cmdlet is provided as the DiscoveryResult input for the Install-SCXAgent cmdlet.

For information about discovering UNIX or Linux computers, type Get-Help Invoke-SCXDiscovery.

This cmdlet returns an array of managed UNIX or Linux computer objects that represent the targeted systems that were successfully installed.

Examples

Example 1: Discover UNIX and Linux computers and install the management agent

PS C:\>$WSCredential = Get-Credential "DavidChew"
PS C:\> $SSHCredential = Get-SCXSSHCredential -UserName "DavidChew" -Key "C:\keys\key21.ppk" -ElevationType sudo
PS C:\> $Pool01 = Get-SCOMResourcePool -DisplayName "Pool01"
PS C:\> Invoke-SCXDiscovery -IPRange 192.168.1.50,192.168.1.75 -ResourcePool $MyPool -WSManCredential $WSCredential -SSHCredential $SSHCredential | Install-SCXAgent

The first command gets a credential for a user by using the Get-Credential cmdlet. The command prompts you for authentication, and then stores the results in the $WSCredential variable.

The second command creates a privileged credential for a user by using the Get-SCXSSHCredential cmdlet. The command stores the result in the $SSHCredential variable.

The third command gets a resource pool named Pool01 by using the Get-SCOMResourcePool cmdlet, and then stores it in the $Pool01 variable.

The final command invokes a discovery of UNIX and Linux computers within a range of IP Addresses by using the Invoke-SCXDiscovery cmdlet. The command passes any discovered computers to the current cmdlet by using the pipeline operator. The command installs the management agent.

Parameters

-ComputerName

Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these 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 active on the computer. If you do not specify a computer, the cmdlet uses the computer for the current management group connection.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the user account under which the management group connection runs. Specify a PSCredential object, such as one that the Get-Credential cmdlet returns, for this parameter. For more information about credential objects, 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.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DiscoveryResult

Specifies the DiscoveryResult object to process for management agent installation as returned by the Invoke-SCXDiscovery cmdlet.

For more information about discovering targeted systems, type Get-Help Invoke-SCXDiscovery.

Type:DiscoveryResult[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SCSession

Specifies an array of Connection objects. To get Connection objects, use the Get-SCOMManagementGroupConnection cmdlet.

If this parameter is not specified, the cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections.

Type:Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Unix.Computer[]

This cmdlet returns an array of managed UNIX and Linux computers that were successfully installed.