Share via


Set-SCOMAgentlessManagedComputer

Changes the settings for agentless managed computers.

Syntax

FromAgentManagedBy

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

FromManagementServerManagedBy

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.

Parameter properties

Type:

RemotelyManagedComputer[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:AgentManagedComputer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromAgentManagedBy
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:ManagementServer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromManagementServerManagedBy
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.