Set-SCOMAgentlessManagedComputer

Changes the settings for agentless managed computers.

Syntax

Set-SCOMAgentlessManagedComputer
   [-Computer] <RemotelyManagedComputer[]>
   [-ManagedByAgent] <AgentManagedComputer>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SCOMAgentlessManagedComputer
   [-Computer] <RemotelyManagedComputer[]>
   [-ManagedByManagementServer] <ManagementServer>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

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

Examples

Example 1: Set the Operations Manager agent to perform agentless monitoring

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

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.

Parameters

-Computer

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

Type:RemotelyManagedComputer[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
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

-ManagedByAgent

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.

Type:AgentManagedComputer
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ManagedByManagementServer

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.

Type:ManagementServer
Position:1
Default value:None
Required:True
Accept pipeline input:False
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.

Type:SwitchParameter
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