Articles in the "AutoDL management module" series
- PowerShell module for managing automated distribution groups
- AutoDL module updated yet again [This article]
Edit 3/27/17: Rather than add another post, this entry has been updated to reflect the addition of the Find Groups button added for group mirroring.
When automating distribution lists, eventually someone will want one that doesn’t use its own filter, but contains the same members as another group. (Usually it is a security group when there is separation between DLs and security groups.) The module has always supported group mirroring, but it required a specific syntax (the LDAP filter had to be prefixed with “guid:”) and that the object’s GUID be entered (without curly braces).
The module has been updated so that it is much easier to use group mirroring. The GUI now has a separate field for entering the groups to mirror:
You select the radio button for either using an LDAP filter or mirroring the membership of other groups. You no longer manually enter the GUID of the object, but enter the distinguished name of the object and it will be converted to the objectGUID when saving the filter. (Using the objectGUID allows membership updates to continue even if the source group is moved and its distinguished name changes.) You can also add groups to the list by clicking the Find Groups button and searching for them. This functionality is provided by an external library that is included in the download. Put the DLL in the same directory as the module and it will automatically be loaded. I have added a check for the library, so if it isn’t found, the Find Groups button will simply be disabled and a label will be displayed next to it that says the dependent file could not be loaded.
When running Get-AutoDLFilter and Set-AutoDLFilter, the objectGUIDs will be converted into the current DNs for display. The GUI output of Get-AutoDLFilter has also been updated to reflect whether it is using an LDAP filter or group mirroring and, if the latter, doesn’t display the sections for the display-formatted and raw filters.
The distinguished name of the object(s) will be validated when the focus leaves the text box (unless clicking the Cancel button), checking that it resolves to an existing group object. If updating a group’s filter from the command line, the MirrorGroup parameter has been added to the Set-AutoDLFilter cmdlet. The same DN validation occurs when updating from the command line, and the LDAPFilter and MirrorGroup parameters are in separate parameter sets so that they are mutually exclusive.
Any existing groups using group mirroring are compatible with this version: Nothing has changed on the “back end,” only how the groups being mirrored get added to a filter has been updated.
Download the module and AD object picker library here:
AutoDLManagement.zip (22.7 KiB)
If you want just the module, it is here:
AutoDLManagement.psm1 (55.4 KiB)