Solved

script to identify any explicit permissions assigned to distribution lists.

Posted on 2014-02-24
4
220 Views
Last Modified: 2014-02-26
Hello,
i am looking for a script to identify any explicit permissions assigned to distribution lists.
0
Comment
Question by:claudiamcse
  • 2
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Vasil Michev (MVP)
ID: 39884871
What permissions are you looking for? SendAs/Send on behalf can be easily obtained:

$DGs = Get-DistributionGroup -ResultSize Unlimited

#For Send As permissions
$DGs | % {Get-RecipientPermission -Identity $_.Identity}

#For Send on Behalf permissions
$DGs | ? {$_.GrantSendOnBehalfTo -ne ""} | ft Name,DisplayName,PrimarySmtpAddress,GrantSendOnBehalfTo

Open in new window


Oh, and this will work for Exchange Online PowerShell only.
0
 

Author Comment

by:claudiamcse
ID: 39889536
Oh. This actually didn't work....will try again
0
 
LVL 38

Accepted Solution

by:
Vasil Michev (MVP) earned 500 total points
ID: 39889599
Again, this will only work in EO PowerShell:

PS C:\> $DGs = Get-DistributionGroup -ResultSize Unlimited
PS C:\> $DGs | % {Get-RecipientPermission -Identity $_.Identity}

Identity                            Trustee                             AccessControlType                   AccessRights                        Inherited
--------                            -------                             -----------------                   ------------                        ---------
TestDG                              vasil                      Allow                               {SendAs}                            False

PS C:\> $DGs | ? {$_.GrantSendOnBehalfTo -ne ""} | ft Name,DisplayName,PrimarySmtpAddress,GrantSendOnBehalfTo

Name                                         DisplayName                                  PrimarySmtpAddress                           GrantSendOnBehalfTo
----                                         -----------                                  ------------------                           -------------------
TestDG                                       TestDG                                       TestDG@domain.com                            {vasil}

Open in new window



 If you run it from the EMS, you will need different cmdlets
0
 

Author Closing Comment

by:claudiamcse
ID: 39889634
thanks!!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now