Answered by:
FULL AcceptMessagesOnlyFrom

Question
-
Hello,
I use Exchange 2007 and run the below script to get the accept message only from:
Get-Content C:\Scripts\List.txt | Get-DistributionGroup | Select-Object DisplayName, AcceptMessagesOnlyFrom > C:\RIGHTS.csv C:\RIGHTS.csv
It results that I am not able to see the entire AcceptMessagesOnlyFrom field on the notepad file:DisplayName AcceptMessagesOnlyFrom
----------- ----------------------
Infra-IT_MANAGER {JOHN SMITH, STEPHANE DOWLING, ANDR...
Would you know how I can get the full AcceptMessagesOnlyFrom field in the notepad?Thanks,
GraigFriday, August 24, 2012 9:03 AM
Answers
-
Try this:
Get-content c:\list.txt| foreach{ $DisplayName=(Get-distributiongroup -identity $_).DisplayName $users=(Get-distributiongroup -identity $_).AcceptMessagesOnlyFrom|%{$_.Name} "DisplayName:" $DisplayName "AcceptMessagesOnlyFrom:" $users } > c:\rights.txt
Thanks,
Evan
Evan Liu
TechNet Community Support
- Marked as answer by Evan LiuModerator Sunday, September 2, 2012 1:09 AM
Thursday, August 30, 2012 10:07 AMModerator
All replies
-
Hi,
What output you get when run this command ?
Get-Content C:\Scripts\List.txt | Get-DistributionGroup -ResultSize unlimited | Select-Object DisplayName, AcceptMessagesOnlyFrom > C:\RIGHTS.csv
Thanks, Swapnil Prajapati
Friday, August 24, 2012 10:24 AM -
- Edited by Evan LiuModerator Sunday, September 2, 2012 1:09 AM type
Monday, August 27, 2012 6:42 AMModerator -
Hi Swapnil,
I tried but I still get the .. at the end the list
Tuesday, August 28, 2012 10:48 AM -
Hello Evan,
I finally get the entire list thank you!! Would you know If I could get it as is:
JOHN SMITH
STEPHANE DOWLING
ANDREA SBROLAThanks again,
GraigTuesday, August 28, 2012 10:50 AM -
Try this:
Get-content c:\list.txt| foreach{ $DisplayName=(Get-distributiongroup -identity $_).DisplayName $users=(Get-distributiongroup -identity $_).AcceptMessagesOnlyFrom|%{$_.Name} "DisplayName:" $DisplayName "AcceptMessagesOnlyFrom:" $users } > c:\rights.txt
Thanks,
Evan
Evan Liu
TechNet Community Support
- Marked as answer by Evan LiuModerator Sunday, September 2, 2012 1:09 AM
Thursday, August 30, 2012 10:07 AMModerator