DSCResources/DSC_ProxySettings/en-US/about_ProxySettings.help.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
.NAME
    ProxySettings
 
.DESCRIPTION
    The resource is used to configure internet proxy settings for a computer
    (LocalMachine) or a user account (CurrentUser).
 
    ## Target
 
    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 https://docs.microsoft.com/en-us/powershell/scripting/dsc/configurations/runasuser
    for more information.
 
.PARAMETER Target
    Key - String
    Allowed values: LocalMachine, CurrentUser
    Specifies if the proxy settings should be set for the LocalMachine or for the CurrentUser. Defaults to 'LocalMachine'.
 
.PARAMETER Ensure
    Write - String
    Allowed values: Present, Absent
    Specifies if proxy settings should be set. Defaults to 'Present'.
 
.PARAMETER ConnectionType
    Write - String
    Allowed values: All, Default, Legacy
    Defines if the proxy settings should be configured for default connections, legacy connections or all connections. Defaults to 'All'.
 
.PARAMETER EnableAutoDetection
    Write - Boolean
    Enable automatic detection of the proxy settings. Defaults to 'False'.
 
.PARAMETER EnableAutoConfiguration
    Write - Boolean
    Use automatic configuration script for specifying proxy settings. Defaults to 'False'.
 
.PARAMETER EnableManualProxy
    Write - Boolean
    Use manual proxy server settings. Defaults to 'False'.
 
.PARAMETER AutoConfigURL
    Write - String
    The URL of the automatic configuration script to specify the proxy settings. Should be specified if 'EnableAutoConfiguration' is 'True'.
 
.PARAMETER ProxyServer
    Write - String
    The address and port of the manual proxy server to use. Should be specified if 'EnableManualProxy' is 'True'.
 
.PARAMETER ProxyServerExceptions
    Write - StringArray
    Bypass proxy server for addresses starting with addresses in this list.
 
.PARAMETER ProxyServerBypassLocal
    Write - Boolean
    Bypass proxy server for local addresses. Defaults to 'False'.
 
.EXAMPLE 1
 
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
        }
    }
}
 
.EXAMPLE 2
 
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'
        }
    }
}
 
.EXAMPLE 3
 
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
        }
    }
}
 
.EXAMPLE 4
 
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
        }
    }
}