lazywinadmin / Monitor-ADGroupMembership

PowerShell script to monitor Active Directory groups and send an email when someone is changing the membership
MIT License
264 stars 61 forks source link

Single Member bugfix #42

Closed revoice1 closed 5 years ago

revoice1 commented 5 years ago

Found a bug in my code addition that caused a failure in the case where the group only had a single member. i.e. line 642 would cause a bug when the $member var only had a single entry, causing it to just be a custom psobject and not an array, therefore it didn't have an op_addition method. Typecasting the var as an array fixes the issue.

lazywinadmin commented 5 years ago

Thanks @revoice1 ! Really appreciated! 👍