Share via


Enable-SCOMAgentProxy

Enables agents to act as proxy agents for other computers.

Syntax

Default (Default)

Enable-SCOMAgentProxy
    [-Agent] <AgentManagedComputer[]>
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Enable-SCOMAgentProxy cmdlet enables one or more agents to act as a proxy agents and discover managed objects on other computers.

Examples

Example 1: Enable an agent to act as a proxy agent

PS C:\>"server01.contoso.com" | Get-SCOMAgent | Enable-SCOMAgentProxy -PassThru

This command gets the Operations Manager agent named server01.contoso.com and enables the agent to act as a proxy agent for other agents and agentless managed computers. The command passes the name of the agent to the DNSHostName parameter of the Get-SCOMAgent cmdlet.

Example 2: Enable agents to act as a proxy agent

PS C:\>Get-SCOMAgent | Where-Object {$_.ProxyingEnabled.Value -eq $False} | Enable-SCOMAgentProxy -Confirm

This command gets all Operations Manager agents that have the ProxyingEnabled property set to $False, and then enables the agents to act as a proxy after the user confirms the action.

Example 3: Enable an agent to act as a proxy agent by using a property value

PS C:\>$Agent = Get-SCOMAgent -DNSHostName "server01.contoso.com"
PS C:\> $Agent.ProxyingEnabled

This example enables an agent to act as an agent proxy by setting a property of the agent.

The first command gets the Operations Manager agent named server01.contoso.com, and stores it in the $Agent variable.

The second command enables the agent stored in the $Agent variable to act as a proxy agent for other computers. The command sets the ProxyingEnabled property to $True for the agent stored in the $Agent variable.

Parameters

-Agent

Specifies an array of AgentManagedComputer objects. This parameter specifies the Operations Manager agents to enable to act as proxy agents. To obtain an AgentManagedComputer object, use the Get-SCOMADAgent cmdlet.

Parameter properties

Type:

AgentManagedComputer[]

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:True
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

-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:2
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.