?
Solved

script to identify any explicit permissions assigned to distribution lists.

Posted on 2014-02-24
4
Medium Priority
?
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 42

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 42

Accepted Solution

by:
Vasil Michev (MVP) earned 2000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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