Set-SCOMAgentlessManagedComputer

Set-SCOMAgentlessManagedComputer

Changes the settings for agentless managed computers.

Syntax

Parameter Set: FromAgentManagedBy
Set-SCOMAgentlessManagedComputer [-Computer] <RemotelyManagedComputer[]> [-ManagedByAgent] <AgentManagedComputer> [-PassThru] [ <CommonParameters>]

Parameter Set: FromManagementServerManagedBy
Set-SCOMAgentlessManagedComputer [-Computer] <RemotelyManagedComputer[]> [-ManagedByManagementServer] <ManagementServer> [-PassThru] [ <CommonParameters>]

Detailed Description

The Set-SCOMAgentlessManagedComputer cmdlet changes settings for agentless managed computers.

Parameters

-Computer<RemotelyManagedComputer[]>

Specifies an array of agentless managed computers. You can use the Get-SCOMAgentlessManagedComputer cmdlet to get managed computers that do not have agents.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ManagedByAgent<AgentManagedComputer>

Specifies an AgentManagedComputer object. This parameter specifies the Operations Manager agent that performs agentless monitoring. The action account of the agent that performs the monitoring must have local administrative rights on the computer that it monitors.

To obtain an AgentManagedComputer object, use the Get-SCOMAgent cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ManagedByManagementServer<ManagementServer>

Specifies a ManagementServer object. This parameter specifies the primary management server that performs agentless monitoring of the agentless managed computers. To obtain a ManagementServer object, use the Get-SCOMManagementServer cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PassThru

Indicates that the cmdlet creates or modifies an object that a command can use in the pipeline. By default, this cmdlet does not generate any output.

Aliases

none

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

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: Set the Operations Manager agent to perform agentless monitoring

This command gets the agentless managed computer named server02 and passes it to the Set-SCOMAgentlessManagedComputer cmdlet by using a pipe operator. The command sets the agent-managed computer named OMAgent01 as the Operations Manager agent that performs agentless monitoring for server02.

PS C:\> Get-SCOMAgentlessManagedComputer -DNSHostName "server02.contoso.com" | Set-SCOMAgentlessManagedComputer -ManagedByAgent (Get-SCOMAgent -DNSHostName "OMAgent01.contoso.com") -PassThru

Add-SCOMAgentlessManagedComputer

Set-SCOMAgentlessManagedComputer

Get-SCOMAgentlessManagedComputer

Get-SCOMAgent

Get-SCOMManagementServer