Skip to content

JF10R/Get-DistributionGroupMemberRecursive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Get-DistributionGroupMemberRecursive

PowerShell script used to recursively get a list of all members within a Distribution Group.

How to use

  1. Execute the function code.

  2. Call the function:

    Get-DistributionGroupMemberRecursive -Group "GroupName" | Export-csv -Path C:\test.csv -Delimiter ',' -Encoding 'UTF8'
    

Initializing the connection (Office 365)

Here is how to setup the connection with Office 365 Exchange servers through Powershell:

Set-ExecutionPolicy RemoteSigned    
$365Logon = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $365Logon -Authentication Basic -AllowRedirection

If you have large Distribution Groups, make sure to ajust the ResultSize parameter of Get-DistributionGroup:

Get-DistributionGroup -ResultSize Unlimited

Credits

Thanks to Mike Goldwin for his original code.
Thanks to JScott for column header labels code.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published