diff --git a/src/PSADTree/Commands/GetADTreePrincipalGroupMembershipCommand.cs b/src/PSADTree/Commands/GetADTreePrincipalGroupMembershipCommand.cs index ce51a42..f84029c 100644 --- a/src/PSADTree/Commands/GetADTreePrincipalGroupMembershipCommand.cs +++ b/src/PSADTree/Commands/GetADTreePrincipalGroupMembershipCommand.cs @@ -162,7 +162,7 @@ private void EnumerateMembership( string source, int depth) { - foreach (Principal group in searchResult) + foreach (Principal group in searchResult.GetSortedEnumerable(_comparer)) { if (ShouldExclude(group, _exclusionPatterns)) {