Skip to content

Instantly share code, notes, and snippets.

@p0w3rsh3ll
Created January 29, 2015 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p0w3rsh3ll/15a59be0f23bf635574e to your computer and use it in GitHub Desktop.
Save p0w3rsh3ll/15a59be0f23bf635574e to your computer and use it in GitHub Desktop.
# Define proxy settings per machine and let autodetect enabled (~default user config per machine)
Configuration AutodetectProxy {
Registry ProxyPerMachinePolicy
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings'
ValueName = 'ProxySettingsPerUser'
Ensure = 'Present'
ValueData = '0'
ValueType = 'Dword'
Force = $true
}
Registry ProxyPerMachineWinHttPSettings
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections'
ValueName = 'WinHttPSettings'
Ensure = 'Absent'
Force = $true
}
Registry ProxyPerMachineDefaultConnectionSettings
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections'
ValueName = 'DefaultConnectionSettings'
Ensure = 'Present'
ValueType = 'Binary'
ValueData = '4600000002000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
Force = $true
}
Registry ProxyPerMachineSavedLegacySettings
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections'
ValueName = 'SavedLegacySettings'
Ensure = 'Present'
ValueType = 'Binary'
ValueData = '4600000003000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
Force = $true
}
Registry ProxyPerMachineProxyEnable
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings'
ValueName = 'ProxyEnable'
Ensure = 'Present'
ValueData = '0'
ValueType = 'Dword'
Force = $true
}
Registry ProxyPerMachineProxyServer
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings'
ValueName = 'ProxyServer'
Ensure = 'Absent'
Force = $true
}
Registry ProxyPerMachineProxyOverride
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings'
ValueName = 'ProxyOverride'
Ensure = 'Absent'
Force = $true
}
Registry ProxyPerMachineAutoConfigURL
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings'
ValueName = 'AutoConfigURL'
Ensure = 'Absent'
Force = $true
}
Registry ProxyPerMachineLockAutoConfig
{
Key = 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Control Panel'
ValueName = 'Autoconfig'
Ensure = 'Present'
ValueData = '1'
ValueType = 'Dword'
Force = $true
}
Registry ProxyPerMachineLockProxy
{
Key = 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Control Panel'
ValueName = 'Proxy'
Ensure = 'Present'
ValueData = '1'
ValueType = 'Dword'
Force = $true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment