title: Setting DistinguishedName using UserPrincipal
body: <p>When using <code>DirectoryEntry</code>, it is possible to set the CN of the new user account, but how to do it using <code>UserPrincipal</code>? The property is readonly.</p>
  
  <pre><code>// From : http://msdn.microsoft.com/en-us/magazine/cc135979.aspx
  DirectoryEntry container = new DirectoryEntry("LDAP://ou=TechWriters,dc=fabrikam,dc=com"); 
  
  // create a user directory entry in the container 
  DirectoryEntry newUser = container.Children.Add("cn=user1Acct", "user"); 
  // add the samAccountName mandatory attribute 
  newUser.Properties["sAMAccountName"].Value = "User1Acct"; 
  // save to the directory 
  newUser.CommitChanges();
  </code></pre>
  
  <p>But using UserPrincipal:</p>
  
  <pre><code>// For the example
  using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain, null, "ou=TechWriters,dc=fabrikam,dc=com")
  {
      using (UserPrincipal user = new UserPrincipal(ctx, "User1Acct", "pwd", true))
      {
           // I would like to do :
           user.DistinguishedName = "user1Acct";
           //
           user.Save();
      }
  }
  </code></pre>