diff --git a/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs b/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs index 0a94ccc..ec1c2d7 100644 --- a/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs +++ b/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs @@ -23,12 +23,14 @@ public class HeatlcheckRuleStaleADRegistrationEnabled : RuleBase(); + var gpo = new Dictionary>(); foreach (GPPRightAssignment right in healthcheckData.GPPRightAssignment) { if (right.Privilege == "SeMachineAccountPrivilege") { - gpo.Add(right, right.User); + if (!gpo.ContainsKey(right)) + gpo[right] = new List(); + gpo[right].Add(right.User); } } var o = ApplyGPOPrority2(healthcheckData, gpo); @@ -37,14 +39,17 @@ public class HeatlcheckRuleStaleADRegistrationEnabled : RuleBase