Saturday, July 12, 2008

List Groups with Delivery Restrictions

With many distribution groups in our organization having delivery restrictions, ensuring that a user/group the ability to send to all of these groups (such as new management or a notification address) can be cumbersome. With this one command, all of the groups that have restrictions on them are immediately printed to the screen to make certain that each is addressed. Of course, this could also be written out to a text file, CSV, or whatever.

get-distributiongroup | foreach-object{if($_.AcceptMessagesOnlyFrom -ne ""){write-host $_.Name}}

 



No comments: