Solved

Get Delivery Restriction Senders (Exchange 2010)

Posted on 2013-01-23
3
2,435 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
Comment Utility
You will have to customize it more according to your needs ....

- Rancy
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
Comment Utility
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
Comment Utility
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

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
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

763 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

11 Experts available now in Live!

Get 1:1 Help Now