question

satyamahapatra-4691 avatar image
0 Votes"
satyamahapatra-4691 asked KyleXu-MSFT commented

create dynamic distribution group exclude disable ids

I wan to create one dynamic distribution group and members will be only enable id.
I tried this fail.
any input. we have nybrid configuration with office365

[PS] C:\Windows\system32>Get-DynamicDistributionGroup xyv@abc.com | Set-DynamicDistributionGroup -rec
ipientfilter (RecipientType -eq 'UserMailbox') -and (CustomAttribute10 -eq "On-Role") -and (HiddenFromAddressListsEnable
d -eq "False") }
At line:1 char:231
+ ... e10 -eq "On-Role") -and (HiddenFromAddressListsEnabled -eq "False") }
+ ~
Unexpected token '}' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

office-exchange-server-administration
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@satyamahapatra-4691
I am writing here to confirm with you any update about this thread now?
If the suggestion below helps, please be free to mark it as an answer for helping more people.

0 Votes 0 ·
ManuPhilip avatar image
0 Votes"
ManuPhilip answered

Try the following cmdlet

 Get-DynamicDistributionGroup xyv@abc.com | Set-DynamicDistributionGroup -recipientfilter "((RecipientType -eq 'UserMailbox') -and (CustomAttribute10 -eq "On-Role") -and (HiddenFromAddressListsEnabled -eq "False"))"
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KyleXu-MSFT avatar image
0 Votes"
KyleXu-MSFT answered

@satyamahapatra-4691

You need to use '' rather ""

 Set-DynamicDistributionGroup -Identity  xyv@abc.com -RecipientFilter "(RecipientType -eq 'UserMailbox') -and (CustomAttribute10 -eq 'On-Role') -and (HiddenFromAddressListsEnabled -eq 'False')"

If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.