Solved

script to identify any explicit permissions assigned to distribution lists.

Posted on 2014-02-24
4
230 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 40

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 40

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
In-place Upgrading Dirsync to Azure AD Connect
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

839 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