none
Windows 2008 R2 Remote Desktop Services Roaming Profile Path RRS feed

  • Question

  • I am trying to programmatically set users roaming profile path for remote desktop 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 like below.<o:p></o:p>

    objUser.TerminalServicesProfilePath = "\\testing\test\"& profilename
    objUser.TerminalServicesHomeDirectory = \\testing\test\& username
    objUser.TerminalServicesHomeDrive = "Y:"

    objUser.AllowLogon = Enabled
    objUser.SetInfo<o:p></o:p>

    I found that the AD object names have changed in 2008 R2 and have updated my code to reflect the changes like this.<o:p></o:p>

    objUser.msTSProfilePath = "\\testing\test\"& profilename
    objUser.msTSHomeDirectory = "\\testing\test\"& username
    objUser.msTSHomeDrive = "Y:"
    objUser.AllowLogon = Enabled
    objUser.SetInfo<o:p></o:p>

    The problem is that while this code updates the users AD object (which I verified using ADSIEDIT) the setting never shows up in Active Directory Users and Computers and it doesn't work when the user logges on.<o:p></o:p>

    Please help.

    Thanks,<o:p></o:p>

    John<o:p></o:p>

    Wednesday, October 10, 2012 12:45 PM