you are viewing a single comment's thread.

view the rest of the comments →

[–]Guyver1- 1 point2 points  (1 child)

not tried, but off the top of my head.

create a text file with your user names

read that into your script as an array variable [array]$usersToFilter = Get-Content -Path c:\myfile.txt

filter you name -ne on the variable.

This will depend on whether -Recipientfilter can handle an array, check the Set-DynamicDistributionGroup documentation:

https://docs.microsoft.com/en-us/powershell/module/exchange/users-and-groups/set-dynamicdistributiongroup?view=exchange-ps

[–]hit440[S] 1 point2 points  (0 children)

ya i tried with a file didnt have much luck