by gingalls at 2013-02-27 17:40:37
Hello,by compugab at 2013-02-27 19:15:43
I need assistance with extracting the individual users from a distribution list that contains nested groups within it.
I need to also include the full names and primary SMTP addresses of the DL’s individual members.
Let me know if you need any additional information.
Many thanks
Gordon
Hello,by gingalls at 2013-02-27 19:56:47
The easiest way to do that is to use the Active Directory module, the Get-AdGroupMember cmdlet and the Recursive parameter like so:Import-Module activedirectory
Get-ADGroupMember -Identity root -Recursive | ForEach-Object{Get-Mailbox -identity $_.Name | Select-Object Name,PrimarySMTPaddress}
Now, can you install the Active Directory module on your Exchange Server?
We have dedicated management servers that have the Exchange 2010 tools installed and load the ActiveDirectory module there which allows us to run these types of scripts without having to
install the ActiveDirectory module onto the Exchange servers themselves.
This script worked great. I just had to add DisplayName after Select-Object and export it out to .csv.
I thank you
Gordon