Problem
You want to modify Internet Explorer’s configuration options.
Solution
To modify the Internet Explorer configuration registry keys, use the SetItemProperty cmdlet. For example, to update the proxy:
SetLocation "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" SetItemProperty . Name ProxyServer Value http://proxy.example.com SetItemProperty . Name ProxyEnable Value 1
Discussion
Internet Explorer stores its main configuration information as properties on the registry key HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings.To change these properties, use the SetItemProperty cmdlet as demonstrated in the solution.
Another common set of properties to tweak are the configuration parameters that define a security zone. An example of this is to prevent scripts from running in the Restricted Sites zone. For each zone, Internet Explorer stores this information as properties of the registry key HKCU:\Software\Microsoft\Windows\CurrentVersion\ Internet Settings\Zones\<Zone>, where <Zone> represents the zone identifier (0, 1, 2, 3, or 4) to manage.
The Internet Explorer zone identifiers are:
- My Computer
- Local intranet
- Trusted sites
- Internet
- Restricted sites
The names of the properties in this key are not designed for human consumption, as they carry illuminating titles such as 1A04 and 1809. While not wellnamed, you can still script them.
For more information about using the Internet Explorer registry settings to configure security zones, see the Microsoft KB article “Description of Internet Explorer Security Zones Registry Entries” at http://support.microsoft.com/kb/182569.