365 EWS Impersonation

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 13685
Joined: Tue May 22, 2007 9:57 am

Re: 365 EWS Impersonation

Post by jvierra » Fri Jul 13, 2018 12:59 pm

Look at the code. That is all I put in. I used the "alias" and not the DN.
With a group:

Code: Select all

PS D:\scripts> New-ManagementScope -Name TestScope2 -RecipientRestrictionFilter "memberofgroup -eq '$dn'"

Name       ScopeRestrictionType Exclusive RecipientRoot RecipientFilter
----       -------------------- --------- ------------- ---------------
TestScope2 RecipientScope       False                   MemberOfGroup -eq 'CN=TestGrp,OU=designedsystems.onmicrosoft.com,OU=Microsoft Exchange Hosted ...
Note that the filter wraps to second line when pasted here.

User avatar
Posts: 41
Joined: Thu Mar 01, 2018 7:46 am

Re: 365 EWS Impersonation

Post by PS_Ross » Mon Jul 16, 2018 6:11 am

Looks like that did it. Thanks bud.