Solved

List of restricted senders to Exchange 2007 DL

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video discusses moving either the default database or any database to a new volume.

770 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