Solved

List of restricted senders to Exchange 2007 DL

Posted on 2011-03-21
3
969 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create an Accepted Domain 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 >> Ac…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

734 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