Enable-SCOMAgentProxy

Enables agents to act as proxy agents for other computers.

Syntax

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.

Type:AgentManagedComputer[]
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

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