Skip to content

Commit

Permalink
Fix for #24
Browse files Browse the repository at this point in the history
after we have added PropertiesToLoad to $GroupSearcher once, subsequent calls to FindOne() will fail when trying to find the next group. If we still have a $Result, and that $Result contains a property named `member`, the loop will continue using the previous successful search results as though they are the current search results, resulting in reprocessing the previous group.
  • Loading branch information
ktwombley authored Aug 10, 2016
1 parent 54862e8 commit b9f8598
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PowerShell/BloodHound.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5421,6 +5421,8 @@ function Get-NetGroupMember {
}

$Members = @()
$GroupSearcher.PropertiesToLoad.Clear()
$Result = $False
try {
$Result = $GroupSearcher.FindOne()
}
Expand Down

0 comments on commit b9f8598

Please sign in to comment.