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.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: 365 EWS Impersonation

Post by jvierra »

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
Shelltastic
Posts: 65
Last visit: Mon Feb 19, 2024 11:31 am

Re: 365 EWS Impersonation

Post by Shelltastic »

Looks like that did it. Thanks bud.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked