IM trying to find a PowerShell script that will populate active directory Distribtuion lists by using an AD Attribute of any user.
For example, a PoewrShell script that retrieves a selected Active Directory attribute for all users (An attached file where fmCostCenter attribute have value of 200, 212 and 218 ), then parses this or interprets in some way, then based on this adds each user with the matching attribute value add to a distribution group. Before adding the user to Distribution Group make a check if the user is already present or not.
Script can be extended to remove the users from Distribution List those do not match this attribute value anymore. Because users keeps moving between different cost centers and do not want to be part of Distribution List.
Appreciate your help..