Compare-ADGroupMembers
Description
Returns information about membership changes to a group based on previous runs of the script.
Requirements
Should be run on an Active Directory Domain Controller.
Usage
- If the script has not been run previously for the target group, the script will create the pertinent registry key and value, and then exit.
- Previous runs of the script are then compared with the current run.
- If changes are detected, the changes will be logged and added to the return object.
- Update the list of users in the registry with the live user list.
- Return the object.
.\Compare-ADGroupMembers.ps1 -ADGroupName "Domain Admins"
Compares the users found in the last run of Compare-ADGroupMembers.ps1 with the current list of members of the specified group and returns the differences between the two.
Parameters
Parameter | Alias | Required | Default | Type | Description |
---|---|---|---|---|---|
ADGroupName | True | String | Specifies the name of the group to compare the membership of. |
Output
Location of output for log, result, and error files.
System.Object
.\Compare-ADGroupMembers-log.txt
.\Compare-ADGroupMembers-data.txt
.\Compare-ADGroupMembers-error.txt