PSADHealth
PSADHealth copied to clipboard
Build a function that will monitor groups for membership changes
Create a function that will monitor a group and report if a membership change is made. Initial thought is that this can be done with compare object by querying the group members at task start and then saving those members to a variable and then running compare-object at regular intervals to check for the changes.
Found these tools to use as reference:
-
https://github.com/lazywinadmin/Monitor-ADGroupMembership/blob/master/Monitor-ADGroupMemberShip.ps1
-
http://wragg.io/watch-for-changes-with-powershell/