Solved

List of restricted senders to Exchange 2007 DL

Posted on 2011-03-21
3
986 Views
Last Modified: 2012-05-11
Hi

Running Exchange 2007, I have a DL that is set to accept messages from only 20 people.

I would like to export that to a CSV file using Powershell. But if I do get-distributiongroup, I can't see this list as a field anywhere.

Does anyone know how I would do this?
0
Comment
Question by:kam_uk
[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
3 Comments
 
LVL 6

Expert Comment

by:Nagarajb
ID: 35186975
Not sure is this is what you are lokking for

Get-DistributionGroup "groupName" | fl Name, AcceptMessagesOnlyFrom
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 35188592
Get-DistributionGroup "groupName" | Select-object Name, AcceptMessagesOnlyFrom | export-csv c:\group.csv
0
 
LVL 12

Expert Comment

by:GusGallows
ID: 35192776
This is how I would do it (mostly for readability sake):

$out = "c:\output.txt" #put to the path\filename of where you want your output.

$grp = get-distributiongroup "groupname" #Put your group name between the quotes

#capture the group displayname for the header.
$grpName = $grp.DisplayName

#Put a header in the output
$inp = "Accept Messages only from the following for $grpName"
out-file $out -inputobject $inp

#list out all of the recipients who can send to the group
$list = $grp.AcceptMessagesOnlyFrom
foreach ($user in $list)
{
	$DN = $user.DistinguishedName
	$rec = get-recipient $DN
	$displayName = $rec.DisplayName
	out-file $out -inputobject $displayName -append
	
}

Open in new window

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
To show how to generate a certificate request 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 Servers >> Certificates…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

630 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