Example 1
Set-AWSProxy -Hostname localhost -Port 8888
This command configures a proxy that does not require special credentials.
Example 2
Set-AWSProxy -Hostname localhost -Port 8888 -Username 1 -Password 1
This command configures a proxy that requires a username and a password.
Example 3
Set-AWSProxy -Hostname localhost -Port 8888 -Credential ([System.Net.CredentialCache]::DefaultCredentials)
This command configures a proxy with default credentials. The -Credentials parameter can be used for any credentials object that implements the ICredentials interface.
Example 4
Set-AWSProxy -Hostname https://proxy.testserver.com -Port 80 -BypassList 169.254.169.250;169.254.169.251;169.254.169.254
This command configures a proxy at https://proxy.testserver.com that uses port number 80. The -BypassList parameter is added to show that IPv4 addresses 169.254.169.250, 169.254.169.251, and 169.254.169.254 do not use the proxy. Note that because your bypass list includes only IP addresses and not FQDNs, quotation marks around the IP address values are not needed. You can use semicolons as a delimiter between IP addresses that you want to bypass. Also, note that if the Windows OS is configured to use IPv4, these IPv4 link-local addresses can be used.
Example 5
Set-AWSProxy -Hostname https://proxy.testserver.com -Port 80 -BypassList '[fd00:ec2::240]','[fd00:ec2::254]'
This command configures a proxy at https://proxy.testserver.com that uses port number 80. The -BypassList parameter is added to show that IPv6 addresses fd00:ec2::240 and fd00:ec2::254 do not use the proxy. If the Windows OS has the IPv4 network protocol stack disabled and uses IPv6 instead, add [fd00:ec2::240] in place of 169.254.169.250 and 169.254.169.251. Then add [fd00:ec2::254] in place of 169.254.169.254.
Example 6
Set-AWSProxy -Port 8888 -Hostname 127.0.0.1 -BypassList @("127.0.0.1", "ip-ranges.amazonaws.com")
This command configures a proxy that uses port number 8888. The -BypassList parameter is added to show that IP address 127.0.0.1, and AWS-based IP addresses, do not use the proxy. Note that because you have a mixture of an IP address and an FQDN, enclose values that you want to bypass in quotation marks as shown in the example, and use a comma as a delimiter. This example formats the values as an array, but you can also format them without parens: Set-AWSProxy -Port 8888 -Hostname 127.0.0.1 -BypassList "127.0.0.1", "ip-ranges.amazonaws.com"
Example 7
Set-AWSProxy -Port 8888 -Hostname 127.0.0.1 -BypassList "127.0.0.1";"ip-ranges.amazonaws.com"
As in the preceding example, this command configures a proxy that uses port number 8888. The -BypassList parameter is added to show that IP address 127.0.0.1, and AWS-based IP addresses, do not use the proxy. Note that because you have a mixture of an IP address and an FQDN, enclose values that you want to bypass in quotation marks as shown in the example. This example, unlike the preceding example, uses semicolons, which are accepted as a delimiter between the quotation-enclosed proxy values. This example formats the BypassList values without the parentheses-enclosed array.