Beispiel #1
0
 public void TestFindOne()
 {
     using (var domainObject = DomainObject.FindOne(this.ADOperator))
     {
         Assert.AreEqual(this.DomainGroupPolicyMinimumPasswordLength, domainObject.GroupPolicyMinimumPasswordLength);
         Assert.AreEqual(this.DomianIsMustMeetComplexityRequirments, domainObject.IsMustMeetComplexityRequirments);
         foreach (UserObject userObject in domainObject.Users)
         {
             Console.WriteLine(userObject.Name);
             Console.WriteLine(userObject.DistinguishedName);
             Console.WriteLine(userObject.Type);
         }
         foreach (ContactObject contactObject in domainObject.Contacts)
         {
             Console.WriteLine(contactObject.Name);
             Console.WriteLine(contactObject.DistinguishedName);
             Console.WriteLine(contactObject.Type);
         }
         foreach (ComputerObject computerObject in domainObject.Computers)
         {
             Console.WriteLine(computerObject.Name);
             Console.WriteLine(computerObject.DistinguishedName);
             Console.WriteLine(computerObject.Type);
         }
         foreach (OrganizationalUnitObject childOrganizationalUnitObject in domainObject.OrganizationalUnits)
         {
             Console.WriteLine(childOrganizationalUnitObject.Name);
             Console.WriteLine(childOrganizationalUnitObject.DistinguishedName);
             Console.WriteLine(childOrganizationalUnitObject.Type);
         }
     }
 }