Set-HcsWebProxy
Set-HcsWebProxy
Sets the web proxy configuration.
Syntax
Parameter Set: Default
Set-HcsWebProxy [-ConnectionURI] <String> [-Authentication] <WebProxyAuthType]> [-Force] [-Password <SecureString> ] [-Username <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-HcsWebProxy cmdlet sets the web proxy configuration for this device. After you set the configuration, you must enable the web proxy by using the Enable-HcsWebProxy cmdlet.
Parameters
-Authentication<WebProxyAuthType]>
Specifies the type of authentication to use. The acceptable values for this parameter are:
-- None
-- Basic
-- NTLM
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ConnectionURI<String>
Specifies the URI for the web proxy server.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Password<SecureString>
Specifies a password. Specify a secure string for this parameter. The cmdlet uses this password to connect to the web proxy.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Username<String>
Specifies a user name for the web proxy.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.HCS.Management.Platform.Support.WebProxyInfo
The WebProxyInfo object has the following properties:
-- String ConnectionURI
-- WebProxyAuthType Authentication
-- String Username
-- IsEnabled
Examples
Example 1: Configure a web proxy
This command configures the web proxy that has the URI http://myproxy:8080. The proxy uses no authentication.
PS C:\> Set-HcsWebProxy -Authentication None -ConnectionURI "http://myproxy:8080"
Example 2: Configure a web proxy with NTLM authentication
This command configures the web proxy to use NTLM authentication for user named ENarvaez.
PS C:\> Set-HcsWebProxy -Authentication NTLM -ConnectionURI "http://myproxy:8080" -Username "ENarvaez"
Example 3: Configure a web proxy with Basic authentication
This command configures the web proxy to use Basic authentication with no password.
PS C:\> Set-HcsWebProxy -Authentication Basic -ConnectionURI "http://myproxy:8080" -Password $Null -Username "ENarvaez"