call centre: 054-5614020

switch from active directory and local user

Posted by: RcBuilder  /   Category: Active Directory / System   /   No Comments

how to switch local machine from active directory and local user: // use this to disconnect local machine from domain (active directory) or connect to domain computer -> properties -> computer name, domain and workgroup settings change settings -> change set domain or.

Read more

add users to active directory c#

Posted by: RcBuilder  /   Category: Active Directory / SOURCE CODE   /   No Comments

active directory c# - add users // ADD USER TO THE DC // organization my_organization within domain my_domain using System.DirectoryServices.AccountManagement; string domain = "my_domain"; string organizationUnit = "my_organization"; using (var pc = new PrincipalContext(ContextType.Domain, domain, string.Format("ou={0},dc={1},dc=com", organizationUnit, domain))) { using(var up = new UserPrincipal(pc)) { up.SamAccountName = "TEST_USER"; up.EmailAddress = "test@mydomain.com"; up.Enabled = true; up.PasswordNeverExpires = true; up.UserCannotChangePassword = true; up.SetPassword("123qwe%2$sD"); up.Save(); } } check if user exists var up = UserPrincipal.FindByIdentity(pc, IdentityType.SamAccountName, user.UserName); bool isNew.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים