From 3aa3503a387830ba4c8f60881d0be5a62d499c9a Mon Sep 17 00:00:00 2001 From: Santiago Squarzon Date: Tue, 3 Sep 2024 10:27:27 -0300 Subject: [PATCH] adding sorting to principal group membership command --- .../Commands/GetADTreePrincipalGroupMembershipCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PSADTree/Commands/GetADTreePrincipalGroupMembershipCommand.cs b/src/PSADTree/Commands/GetADTreePrincipalGroupMembershipCommand.cs index f0b9fa8..314c606 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)) {