Skip to main content

Synopsis

Sets proxy configuration in module memory for the current session. If an Automate agent is installed, updates the ProxyServerURL, ProxyUsername, and ProxyPassword values in the agent’s registry and restarts the agent service to apply the changes.

Syntax

# Set proxy with optional credentials
Set-LTProxy [-ProxyServerURL <string>] [-ProxyUsername <string>] [-ProxyPassword <string>]
            [-EncodedProxyUsername <string>] [-EncodedProxyPassword <string>]
            [-WhatIf] [-Confirm] [<CommonParameters>]

# Auto-detect system proxy
Set-LTProxy -DetectProxy [-WhatIf] [-Confirm] [<CommonParameters>]

# Clear all proxy settings
Set-LTProxy -ResetProxy [-WhatIf] [-Confirm] [<CommonParameters>]
-DetectProxy and -ResetProxy are mutually exclusive with each other and with all credential parameters. -ProxyUsername and -ProxyPassword require -ProxyServerURL and cannot be combined with the encoded variants.

Parameters

ProxyServerURL
string
The proxy server URL and port to use for module operations and the installed agent.Accepted formats: proxyhostname.fqdn.com, proxyhostname.fqdn.com:8080Accepts pipeline input by value and by property name.
ProxyUsername
string
Plain-text username for proxy authentication. Must be used together with -ProxyPassword and -ProxyServerURL.
ProxyPassword
string
Plain-text password for proxy authentication. Must be used together with -ProxyUsername and -ProxyServerURL.
EncodedProxyUsername
string
LabTech-encoded proxy username. Must be encoded with the agent password. Decoded automatically using the agent password before being applied. Must be used together with -EncodedProxyPassword and -ProxyServerURL.
Reinstalling the agent generates a new agent password, which will invalidate previously encoded values.
EncodedProxyPassword
string
LabTech-encoded proxy password. Must be encoded with the agent password. Decoded automatically using the agent password before being applied. Must be used together with -EncodedProxyUsername and -ProxyServerURL.
DetectProxy
switch
Attempts to auto-detect system proxy settings. Discovered settings are applied to the module session and, if an agent is installed, to the agent registry. Aliases: -Detect, -AutoDetect.Cannot be combined with any other parameter.
ResetProxy
switch
Clears all proxy settings from the module session and, if an agent is installed, from the agent registry. Aliases: -Clear, -Reset, -ClearProxy.Cannot be combined with any other parameter.

Examples

Set a proxy URL with no authentication:
Set-LTProxy -ProxyServerURL 'http://proxy.domain.com:8080'
Set a proxy URL with plain-text credentials:
Set-LTProxy -ProxyServerURL 'http://proxy.domain.com:8080' -ProxyUsername 'user' -ProxyPassword 'pass'
Set a proxy URL with pre-encoded credentials:
Set-LTProxy -ProxyServerURL 'http://proxy.domain.com:8080' -EncodedProxyUsername '1GzhlerwMy0ElG9XNgiIkg==' -EncodedProxyPassword 'Duft4r7fekTp5YnQL9F0V9TbP7sKzm0n'
Auto-detect system proxy settings:
Set-LTProxy -DetectProxy
Disable and clear proxy settings:
Set-LTProxy -ResetProxy

Build docs developers (and LLMs) love