Skip to content

Commit b2ac76a

Browse files
authored
Added example when using variables in recipientfilter
1 parent 7e52bbd commit b2ac76a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

exchange/exchange-ps/exchange/users-and-groups/Set-DynamicDistributionGroup.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,16 @@ Change the IncludedRecipients query filter to MailboxUsers.
138138

139139
Add the value Internal to the ConditionalCustomAttribute1 attribute.
140140

141+
### -------------------------- Example 2 --------------------------
142+
```
143+
$extAtrValue="Contoso"
144+
Set-DynamicDistributionGroup -Identity Developers -RecipientFilter "ExtensionCustomAttribute1 -eq '$extAtrValue'"
145+
```
146+
147+
This example applies the following changes to the existing dynamic distribution group named Developers:
148+
149+
Sets the RecipientFilter custom OPath filter using a variable based value of a specific recipient property.
150+
141151
## PARAMETERS
142152

143153
### -Identity
@@ -1684,6 +1694,8 @@ The RecipientFilter parameter specifies a custom OPath filter that's based on th
16841694
16851695
- Use braces { } around the whole OPath syntax string.
16861696
1697+
- Use double quotation marks " " around the whole OPath sintax if using variables, see example 2 in this article.
1698+
16871699
- Include a hyphen before all operators.
16881700
16891701
- In cloud-based environments, you can't use a wildcard as the first character. For example, Sales\* is allowed, but \*Sales isn't allowed.

0 commit comments

Comments
 (0)