-
Notifications
You must be signed in to change notification settings - Fork 88
ProxySettings
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Target | Key | String | Specifies if the proxy settings should be set for the LocalMachine or for the CurrentUser. Defaults to 'LocalMachine'. |
LocalMachine , CurrentUser
|
Ensure | Write | String | Specifies if proxy settings should be set. Defaults to 'Present'. |
Present , Absent
|
ConnectionType | Write | String | Defines if the proxy settings should be configured for default connections, legacy connections or all connections. Defaults to 'All'. |
All , Default , Legacy
|
EnableAutoDetection | Write | Boolean | Enable automatic detection of the proxy settings. Defaults to 'False'. | |
EnableAutoConfiguration | Write | Boolean | Use automatic configuration script for specifying proxy settings. Defaults to 'False'. | |
EnableManualProxy | Write | Boolean | Use manual proxy server settings. Defaults to 'False'. | |
AutoConfigURL | Write | String | The URL of the automatic configuration script to specify the proxy settings. Should be specified if 'EnableAutoConfiguration' is 'True'. | |
ProxyServer | Write | String | The address and port of the manual proxy server to use. Should be specified if 'EnableManualProxy' is 'True'. | |
ProxyServerExceptions | Write | StringArray[] | Bypass proxy server for addresses starting with addresses in this list. | |
ProxyServerBypassLocal | Write | Boolean | Bypass proxy server for local addresses. Defaults to 'False'. |
The resource is used to configure internet proxy settings for a computer
(LocalMachine
) or a user account (CurrentUser
).
The Target
parameter is used to specify whether to configure the proxy
settings for the machine or for a specific user account.
If the Target
is set to CurrentUser
then the proxy settings will be
configured for the user account that the resource runs under. This is
usually the account the DSC Local Configuration Manager runs under,
which is LocalSystem
.
You can configure the proxy settings on a different user account by
specifying the PsDscRunAsCredential
in the resource configuration.
See this page for more information.
Sets the computer to automatically detect the proxy settings.
Configuration ProxySettings_AutoDetectProxy_Config
{
Import-DSCResource -ModuleName NetworkingDsc
Node localhost
{
ProxySettings AutoDetectProxy
{
Target = 'LocalMachine'
Ensure = 'Present'
EnableAutoDetection = $true
EnableAutoConfiguration = $false
EnableManualProxy = $false
}
}
}
Sets the computer to use an automatic WPAD configuration script that will be downloaded from the URL 'http://wpad.contoso.com/wpad.dat'.
Configuration ProxySettings_AutoConfigurationProxy_Config
{
Import-DSCResource -ModuleName NetworkingDsc
Node localhost
{
ProxySettings AutoConfigurationProxy
{
Target = 'LocalMachine'
Ensure = 'Present'
EnableAutoDetection = $false
EnableAutoConfiguration = $true
EnableManualProxy = $false
AutoConfigURL = 'http://wpad.contoso.com/wpad.dat'
}
}
}
Sets the computer to use a manually configured proxy server with the address 'proxy.contoso.com' on port 8888. Traffic to addresses starting with 'web1' or 'web2' or any local addresses will not be sent to the proxy.
Configuration ProxySettings_ManualProxy_Config
{
Import-DSCResource -ModuleName NetworkingDsc
Node localhost
{
ProxySettings ManualProxy
{
Target = 'LocalMachine'
Ensure = 'Present'
EnableAutoDetection = $false
EnableAutoConfiguration = $false
EnableManualProxy = $true
ProxyServer = 'proxy.contoso.com:8888'
ProxyServerExceptions = 'web1', 'web2'
ProxyServerBypassLocal = $true
}
}
}
Sets a user account to use a manually configured proxy server with the address 'proxy.contoso.com' on port 8888. Traffic to addresses starting with 'web1' or 'web2' or any local addresses will not be sent to the proxy.
The user account that the proxy settings are configured for will be the account that applies the resource.
Configuration ProxySettings_ManualProxyForCurrentUser_Config
{
Import-DSCResource -ModuleName NetworkingDsc
Node localhost
{
ProxySettings ManualProxy
{
Target = 'CurrentUser'
Ensure = 'Present'
EnableAutoDetection = $false
EnableAutoConfiguration = $false
EnableManualProxy = $true
ProxyServer = 'proxy.contoso.com:8888'
ProxyServerExceptions = 'web1', 'web2'
ProxyServerBypassLocal = $true
}
}
}
- DefaultGatewayAddress
- DnsClientGlobalSetting
- DnsConnectionSuffix
- DnsServerAddress
- Firewall
- FirewallProfile
- HostsFile
- IPAddress
- IPAddressOption
- NetAdapterAdvancedProperty
- NetAdapterBinding
- NetAdapterLso
- NetAdapterName
- NetAdapterRdma
- NetAdapterRsc
- NetAdapterRss
- NetAdapterState
- NetBios
- NetConnectionProfile
- NetIPInterface
- NetworkTeam
- NetworkTeamInterface
- ProxySettings
- Route
- WaitForNetworkTeam
- WinsServerAddress
- WinsSetting