You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exchange/exchange-ps/exchange/Get-DistributionGroupMember.md
+19-30Lines changed: 19 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,6 @@ ms.reviewer:
12
12
# Get-DistributionGroupMember
13
13
14
14
## SYNOPSIS
15
-
16
15
This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.
17
16
18
17
Use the Get-DistributionGroupMember cmdlet to view the members of distribution groups and mail-enabled security groups.
If your organization has multiple Active Directory domains, you may need to run the Set-ADServerSettings cmdlet with the ViewEntireForest parameter set to $true before running the Get-DistributionGroupMember cmdlet to view the entire forest. For more information, see Example 2.
38
36
39
37
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://learn.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
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.
60
56
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 {
This example downloads a comma-separated value (CSV) file containing all groups and members.
73
+
61
74
## PARAMETERS
62
75
63
76
### -Identity
64
-
65
77
The Identity parameter specifies the distribution group or mail-enabled security group. You can use any value that uniquely identifies the group. For example:
The Credential parameter specifies the username and password that's used to run this command. Typically, you use this parameter in scripts or when you need to provide different credentials that have the required permissions.
90
101
91
102
A value for this parameter requires the Get-Credential cmdlet. To pause this command and receive a prompt for credentials, use the value `(Get-Credential)`. Or, before you run this command, store the credentials in a variable (for example, `$cred = Get-Credential`) and then use the variable name (`$cred`) for this parameter. For more information, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential).
This parameter is available only in on-premises Exchange.
109
119
110
120
The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.
This parameter is available only in on-premises Exchange.
128
137
129
138
The IgnoreDefaultScope switch tells the command to ignore the default recipient scope setting for the Exchange PowerShell session, and to use the entire forest as the scope. You don't need to specify a value with this switch.
This parameter is available only in the cloud-based service.
152
160
153
161
The IncludeSoftDeletedGroups switch specifies whether to include soft-deleted group members in the results. You don't need to specify a value with this switch.
This parameter is available only in on-premises Exchange.
173
180
174
181
The ReadFromDomainController switch specifies that information should be read from a domain controller in the user's domain. You don't need to specify a value with this switch.
The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
213
218
214
219
## INPUTS
215
220
216
221
### Input types
217
-
218
222
To see the input types that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
219
223
220
224
## OUTPUTS
221
225
222
226
### Output types
223
-
224
227
To see the return types, which are also known as output types, that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.
225
228
229
+
## NOTES
226
230
227
-
To download a comma-separated values (CSV) file containing all groups and members, use the following cmdlet:
228
-
229
-
230
-
```powershell
231
-
$Groups = Get-UnifiedGroup -ResultSize Unlimited
232
-
$Groups | ForEach-Object {
233
-
$group = $_
234
-
Get-UnifiedGroupLinks -Identity $group.Name -LinkType Members -ResultSize Unlimited | ForEach-Object {
0 commit comments