title: How to set the proxy server for Exchange in outlook 2007 and other setting automatically using the windows registry?
body: <p>I'm new to using the windows registry. </p>
  
  <p>Here is my problem and the context:</p>
  
  <p>I need to write a powershell script that will automatically change the following settings in outlook 2007 for a new account in such a way that you will only need to enter the LogonDomain\UserName and Password as outlined in step 2:</p>
  
  <p>Step 1: 
  Tools -> Account Setting... -> double click the email account -> More Settings... -> Connection -> check the box "Connect to Microsoft Exchange using HTTP" -> Exchange Proxy Setting... -> <strong>enter the proxy server</strong> (e.g. exmail.example.com) -> check the box "On fast networks..." and "On slow networks..." -> Set "Basic Authentication" in drop down bar -> Ok -> Ok -> next -> finish</p>
  
  <p>Step 2:
  Restart Outlook -> Enter LogonDomain and UserName -> Enter Password -> Repeat Step 1 except this time uncheck the box "On fast networks..."</p>
  
  <p>note: some of the setting from step 1 will already be set when you do step 2, such as the name of the proxy server for exchange.</p>
  
  <p>To find the changes made to the registry I used the application RegFromApp, which records every registry change made by a specific process, Outlook in this case. I wrote two scripts to  make the changes recorded by RegFromApp after manually carrying out step 1 and 2 on a new account.</p>
  
  <p>When I try to execute step 1 on a new account it fails to make the changes. However, if I  manually carry out step 1 and then execute step 2 the appropriate changes are made. Then if I execute step 1 the settings are changed appropriately! Unfortunately, only having step 2 automated isn't good enough. I think the problem lies with "the enter the proxy server" part of step 1. Nowhere in my script lies the string, "exmail.example.com." There are loads of hexadecimal values changed and it possible that "exmail.example.com" is encoded into one of those, but I don't know.</p>
  
  <p>Q: Does anyone know how to set the proxy server for exchange using the registry, if it's possible to do so, or if there is even a reg key for this setting?</p>
  
  <p>Thanks</p>
  
  <p>Patrick</p>