Skip to content

Commit 9477b62

Browse files
authored
Merge pull request MicrosoftDocs#11474 from Ashok-Lobo/Ashok-Lobo-8426457
Updated Get-DistributionGroupMember.md-ADO-8426457
2 parents 3202486 + 4e105bb commit 9477b62

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

exchange/exchange-ps/exchange/Get-DistributionGroupMember.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ Get-DistributionGroupMember -Identity "Marketing Worldwide"
5454

5555
This example sets the scope of the search to the entire forest by running the Set-ADServerSettings cmdlet, then the Get-DistributionGroupMember cmdlet searches the entire forest for the distribution group members in the Marketing Worldwide distribution group.
5656

57+
### Example 3
58+
```powershell
59+
$Groups = Get-UnifiedGroup -ResultSize Unlimited
60+
61+
$Groups | ForEach-Object {
62+
$group = $_
63+
Get-UnifiedGroupLinks -Identity $group.Name -LinkType Members -ResultSize Unlimited | ForEach-Object {
64+
New-Object -TypeName PSObject -Property @{
65+
Group = $group.DisplayName
66+
Member = $_.Name
67+
EmailAddress = $_.PrimarySMTPAddress
68+
RecipientType= $_.RecipientType
69+
}}} | Export-CSV "$env:USERPROFILE\Desktop\Office365GroupMembers.csv" -NoTypeInformation -Encoding UTF8
70+
```
71+
72+
This example downloads a comma-separated value (CSV) file containing all groups and members.
73+
5774
## PARAMETERS
5875

5976
### -Identity

0 commit comments

Comments
 (0)