Set-ProxyAgent
Set-ProxyAgent
Sets the proxy agent for a remotely managed computer or device.
Syntax
Parameter Set: FromRemotelyManagedDevice
Set-ProxyAgent [-ProxyAgent] <AgentManagedComputer> [-Device] <RemotelyManagedDevice[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: FromRemotelyManagedComputer
Set-ProxyAgent [-ProxyAgent] <AgentManagedComputer> [-Computer] <RemotelyManagedComputer[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Sets the proxy agent for a remotely managed computer or device.
Parameters
-Computer<RemotelyManagedComputer[]>
Specifies the computer or set of computers for which to configure the proxy agent.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Device<RemotelyManagedDevice[]>
Specifies the device or set of devices for which to configure the proxy agent.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-ProxyAgent<AgentManagedComputer>
Specifies the proxy agent to use.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before executing the command.
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
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
Notes
- For more information, type "Get-Help Set-ProxyAgent -detailed". For technical information, type "Get-Help Set-ProxyAgent -full".
When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".
Examples
-------------- EXAMPLE 1 --------------
This command begins by using Get-RemotelyManagedComputer and Where-Object to retrieve an object that represents contoso1.fabrikam.net. It stores the result in the $computer variable. It then uses Get-Agent to retrieve an object that represents contoso2.fabrikam.net and stores the result in the $agent variable. Last, it uses Set-ProxyAgent to set contoso2 as a proxy agent for contoso1.
C:\PS>$computer = get-remotelymanagedcomputer |
where-object {$_.Name -eq 'contoso1.fabrikam.net'}
$agent = get-agent |
where {$_.Name -eq 'contoso2.fabrikam.net'}
set-proxyagent -proxyagent $agent -computer $computer
Related topics
Unkown