Solved

Get Delivery Restriction Senders (Exchange 2010)

Posted on 2013-01-23
3
2,579 Views
Last Modified: 2013-01-24
-Exchange 2010-
In EMC> Mail Flow Settings> Message Delivery Restrictions> Only senders in the following list

------------
The below mailboxes have rights to send emails to Dynamic DLs and Univerisal DLs.
Is there a script that can locate which DLs the mailboxes have rights to.

Mailboxes:
Corporate Services
Travel Services
Procurement
Real Estate
0
Comment
Question by:GJohn32
3 Comments
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 38811416
You will have to customize it more according to your needs ....

- Rancy
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38811549
Try this script.. Run it in Exchange Management Shell..
$Result = @()
$Users = "Corporate Services","Travel Services","Procurement","Real Estate"
$DynamicGroups = Get-DynamicDistributionGroup -ResultSize Unlimited
$Groups = Get-DistributionGroup -ResultSize Unlimited
foreach ($User in $Users){
$Result += $DynamicGroups | ?{$_.AcceptMessagesOnlyFrom -Match $User} | Select @{n="User";e={$User}},Name,PrimarySmtpAddress,AcceptMessagesOnlyFrom
$Result += $Groups | ?{$_.AcceptMessagesOnlyFrom -Match $User} | Select @{n="User";e={$User}},Name,PrimarySmtpAddress,AcceptMessagesOnlyFrom
}
$Result | Select User,Name,PrimarySmtpAddress,{$_.AcceptMessagesOnlyFrom} | Export-Csv C:\report.csv -NoTypeInformation

Open in new window

0
 
LVL 1

Author Closing Comment

by:GJohn32
ID: 38815402
Thanks for your help Subsun.  I was unable to get the script to work.  Not sure why. The CSV file created but was blank.  But with your script I broke it down and made individual cmds.  Your help was greatly appreciated.

Get-DynamicDistributionGroup -ResultSize Unlimited | Where {$_.AcceptMessagesOnlyFrom -Match "xxx/xxx"} | Select displayname,primarysmtpaddress | Export-CSV C:\xxx.csv


Get-DistributionGroup -ResultSize Unlimited | Where {$_.AcceptMessagesOnlyFrom -Match "xxx\xxx"} | Select displayname,primarysmtpaddress | Export-CSV C:\xxx.csv
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 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