title: Setting Remote Desktop Services Profile and Home Directory paths Windows 2008
body: <p>I am trying to programmatically set users roaming profile path for remote desktop services (Terminal Services) in Windows 2008 R2 Acitve Directlry. I am able to do this in Windows 2003 without any issues using vbscript or powershell with similar code to that listed below.</p>
  
  <pre><code>objUser.TerminalServicesProfilePath = "\\testing\test\"&amp; profilename
  objUser.TerminalServicesHomeDirectory = \\testing\test\&amp; username
  objUser.TerminalServicesHomeDrive = "Y:"
  objUser.AllowLogon = Enabled
  objUser.SetInfo
  </code></pre>
  
  <p>I found that the AD object names have changed in 2008 R2 and have updated my code to reflect the changes like this.</p>
  
  <pre><code>objUser.msTSProfilePath = "\\testing\test\"&amp; profilename
  objUser.msTSHomeDirectory = "\\testing\test\"&amp; username
  objUser.msTSHomeDrive = "Y:"
  objUser.AllowLogon = Enabled
  objUser.SetInfo
  </code></pre>
  
  <p>The problem is that while this code updates the users AD object (which I verified using ADSIEDIT) the settings never shows up in Active Directory Users and Computers and it doesn't work when the user logges on to a remote desktop session.</p>