| c# Programming Glossary: susernameHow to programmatically create Windows user accounts on Windows 7 or Windows Server 2008? http://stackoverflow.com/questions/5984600/how-to-programmatically-create-windows-user-accounts-on-windows-7-or-windows-ser  code to work public UserPrincipal CreateNewUser string sUserName string sPassword  first check that the user doesn't exist if..  first check that the user doesn't exist if GetUser sUserName null   PrincipalContext oPrincipalContext GetPrincipalContext.. new UserPrincipal oPrincipalContext  oUserPrincipal.Name sUserName  oUserPrincipal.SetPassword sPassword  User Log on Name  oUserPrincipal.UserPrincipalName.. 
 |