title: MSBuild, deployment and impersonation
body: <p>We've run into a little problem with some of our team builds, where a project can have its own active directory. When we deploy a projekt from a team build, we run into user permission problems, since authorization is relative to the AD - e.g. the user group 'Everyone' on a folder, is relative to the AD. I've tried to add the build user directly to the projects AD, but I get an error specifying that no logon server is available. Just added a local user to the server doesn't work either.</p>
  
  <p>I cannot create  a trust between the custom AD's and the produktion AD. I've noted the powershell to accomplish this, but am hoping for a more elegant way. I've tried using <a href="http://cowboynomore.posterous.com/msbuild-impersonation" rel="nofollow">Michael Roufa's</a> wrapper for Community Tasks, but I cannot make it work, for some reason.</p>
  
  <p>So... my question is whether it is possible to impersonate a user in msbuild in an elegant way, when invoking other tasks?</p>
  
  <p>Software: TFS2010, MSBuild 4.0, Various tasks lib + custom, Windows 2008 R2 servers</p>