Esempio n. 1
0
        private void collectSidItemSystemData(sid_sid_item sidItem)
        {
            string trusteeSID = sidItem.trustee_sid.Value;

            IEnumerable<WmiObject> wmiObjects = this.searchSIDObjectsOnTarget(trusteeSID);
            if ((wmiObjects == null) || (wmiObjects.Count() == 0))
                throw new KeyNotFoundException();

            WmiObject userAccount = wmiObjects.First();
            sidItem.trustee_domain = OvalHelper.CreateItemEntityWithStringValue(userAccount.GetFieldValueAsString("Domain"));
            sidItem.trustee_name = OvalHelper.CreateItemEntityWithStringValue(userAccount.GetValueOf("Name").ToString());
        }
        private IList<ItemType> createSidItemsToCollect(List<string> derivedUsers)
        {
            var sid_sidItemsToCollect = new List<ItemType>();
            foreach (var user in derivedUsers)
            {
                var newSidSidItem = new sid_sid_item() { trustee_sid = OvalHelper.CreateItemEntityWithStringValue(user) };
                sid_sidItemsToCollect.Add(newSidSidItem);
            }

            return sid_sidItemsToCollect;
        }
Esempio n. 3
0
 private void SetTrusteeSIDEntityStatus(sid_sid_item sidsidItem, StatusEnumeration status)
 {
     sidsidItem.trustee_sid.status = status;
     if (status.Equals(StatusEnumeration.doesnotexist) || status.Equals(StatusEnumeration.error))
         sidsidItem.trustee_sid.Value = string.Empty;
 }