Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

Exchange Powershell - Create-DynamicDistribution Group sanity check

Experts - need a quick sanity check here. Trying to run this command and it works with all the filters EXCEPT it is pulling users outside the recipient container as well.. is there something I am completely missing??!

I assumed by specifying "-RecipientContainer" to a certain OU, it would only search within that OU, but when I click the "preview" button in EMC, it is pulling mailboxes OUTSIDE that OU. Basically I am trying to pull all mailboxes within a certain OU that does NOT have specific custom attributes set.

New-DynamicDistributionGroup -Name "_Test DistroUsers" -alias "_testdistrousers" -organizationalunit "boo.com/ALL Users/DeptA/Research" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and ((CustomAttribute1 -ne "ADMIN") -and (CustomAttribute1 -notlike "*_PUBLIC") -and (CustomAttribute1 -notlike "BLAH")))} -RecipientContainer "boo.com/ALL Users/DeptA/Research" 

Open in new window


Thank you!
0
ThinkPaper
Asked:
ThinkPaper
  • 2
  • 2
1 Solution
 
SubsunCommented:
The command is ok.. What do you see in EMC? is it showing the correct RecipientContainer for the new DDG?
0
 
ThinkPaperAuthor Commented:
Akhater - sounds exactly like my issue. Just to verify - so even though EMC is showing results outside the OU, the results are correct, right? So I don't have to worry that if I send to the distro, it will send to users outsdie the OU?

Just want to make sure since the actual dynamic distro I am playing with includes probably 50% of our user base, and I don't want to make a mistake.

Thanks!
0
 
AkhaterCommented:
If it is the same behavior I describe in my blog then you can be sure that the email will reach only the correct people

It is easy to make sure using a test group. Although I tested it and I am confident it won't cause you any issue
0
 
ThinkPaperAuthor Commented:
Gotcha, Thanks! I wish Microsoft would fix this though... @__@
0

Featured Post

Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now