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
Solved

Get Delivery Restriction Senders (Exchange 2010)

Posted on 2013-01-23
3
2,542 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
To show how to create a transport rule 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 >> Rules tab.:  To cr…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

828 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