Windows Server - How to use Powershell to make list of SMTP relay allow IP addresse

Asked By k e n -a t- k en bl ai r *-d_o_t-* c0m on 10-Sep-08 03:18 PM
I'd like to use Powershell to create a simple list of the IP addresses in the
SMTP allow relay config. Does anyone have a script that'll do that?

Moving further, I'd like to modify the script to add/remove IP addresses
from the access list.  I have a good VB script that does this, but I'd like
to do it with powershell.

We are a large organization with three servers doing relay for hundreds of
internal hosts, and I'm working on a method to test these addresses and
remove unresponsive hosts from the access list.


k e n -a t- k en bl ai r *-d_o_t-* c0m replied on 10-Sep-08 03:21 PM
I failed to mention that I am dealing with Exchange 2003.
Rich Matheisen [MVP] replied on 10-Sep-08 09:15 PM
On Wed, 10 Sep 2008 12:21:01 -0700, ken444444 <k e n -a t- k en bl ai

Your VB uses COM to get at that information, right? Powershell can
also use COM. But if it works in VB and you have to use COM in both
cases, why bother using Powershell?
Rich Matheisen
MCSE+I, Exchange MVP