Set-VpnConnectionProxy

Configures web proxy information for the specified VPN connection.

Syntax

Set-VpnConnectionProxy
   [-Name] <String>
   [-AutoConfigurationScript <String>]
   [-AutoDetect]
   [-BypassProxyForLocal]
   [-ExceptionPrefix <String[]>]
   [-ProxyServer <String>]

Description

The Set-VpnConnectionProxy cmdlet configures web proxy information for the specified VPN connection. If errors occur when you modify the web proxy information, the error information is returned.

Examples

Example 1: Configure the proxy settings for a VPN connection profile

PS C:\>Set-VpnConnectionProxy -Name Contoso -ProxyServer 10.0.0.1:8080 -BypassProxyForLocal

This command sets the proxy configuration for the VPN connection named Contoso to use the proxy server with IP address 10.0.0.1 over port 8080, as specified by the ProxyServer parameter. The command also specifies that internal IP addresses are not routed to the proxy server, as specified by the BypassProxyForLocal parameter.

Example 2: Configure proxy and exclude based on domain and network

PS C:\>Set-VpnConnectionProxy -Name "Contoso" -ProxyServer "10.0.0.1:8080" -ExcludePrefix '10.', '*.microsoft.com'

This command also sets the proxy for Contoso VPN and also specifies prefixes for addresses that will not use proxy via the ExcludePrefix parameter. This exclude 10.0.0.0/8 and *.microsoft.com.

Parameters

-AutoConfigurationScript

Specifies the name of the automatic WPAD configuration script that the specified connection uses.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AutoDetect

Indicates that proxy settings are automatically detected.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BypassProxyForLocal

Indicates that the proxy configuration is bypassed for local addresses.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExceptionPrefix

Specifies the prefixes for internet addresses for which the proxy is not to be used.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the VPN connection for which the proxy settings are configured.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ProxyServer

Specifies the web proxy server IP address and port number. Specify the address and port separated by a colon. For example, 10.0.0.1:8080. If you do not specify the port number, port 80 is used.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False