Share via


Set-HcsWebProxy

Set-HcsWebProxy

Sets the web proxy configuration.

Sintaxe

Parameter Set: Default
Set-HcsWebProxy [-Authentication <WebProxyAuthType> ] [-ConnectionURI <String> ] [-Force] [-Password <SecureString> ] [-Username <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrição detalhada

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.

Parâmetros

-Authentication<WebProxyAuthType>

Specifies the type of authentication to use. Os valores aceitáveis para este parâmetro são:

-- None
-- Basic
-- NTLM

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-ConnectionURI<String>

Specifies the URI for the web proxy server.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Force

Força o comando a ser executado sem solicitar a confirmação do usuário.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

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

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Username<String>

Specifies a user name for the web proxy.

Aliases

nenhuma

Necessário?

false

Posição?

named

Valor padrão

nenhuma

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Confirm

Solicita que você confirme antes de executar o cmdlet.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-WhatIf

Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

<CommonParameters>

Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.

Saídas

O tipo de saída é o tipo de objeto emitido pelo cmdlet.

  • Microsoft.HCS.Management.Platform.Support.WebProxyInfo

    The WebProxyInfo object has the following properties:

    -- String ConnectionURI
    -- WebProxyAuthType Authentication
    -- String Username
    -- IsEnabled

Exemplos

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" 

Tópicos relacionados

Disable-HcsWebProxy

Enable-HcsWebProxy

Get-HcsWebProxy