Skip to content

Instantly share code, notes, and snippets.

@p0w3rsh3ll
Last active August 29, 2015 14:14
Show Gist options
  • Save p0w3rsh3ll/a4e606996150b63ae54b to your computer and use it in GitHub Desktop.
Save p0w3rsh3ll/a4e606996150b63ae54b to your computer and use it in GitHub Desktop.
# Define a proxy URL for a configuration script
Configuration ProxyURL {
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 = '46000000040000000500000000000000000000001D000000687474703A2F2F6D7970726F78792E6671646E2F70726F78792E7061630000000000000000000000000000000000000000000000000000000000000000'
Force = $true
}
Registry ProxyPerMachineSavedLegacySettings
{
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections'
ValueName = 'SavedLegacySettings'
Ensure = 'Present'
ValueType = 'Binary'
ValueData = '46000000090000000500000000000000000000001D000000687474703A2F2F6D7970726F78792E6671646E2F70726F78792E7061630000000000000000000000000000000000000000000000000000000000000000'
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 = 'Present'
ValueData = 'http://myproxy.fqdn/proxy.pac'
ValueType = 'String'
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