I have a powershell script which I'm using to set up a number of identical Server 2008 R2 boxes. We have the microsoft SMTP service installed (as "virtual server #1") but I can't find Powershell code to change the properties such that the SMTP service (which can only be manipulated via IIS 6 manager) allows the local system to relay through it. We have both an application (and the PS script) that need to be able to send emails, but it only works if we set the local relay to be allowed.
Security is not an issue on the open relay.
I've seen references to VB, and even one to a purchasable cmdlet - neither of which are really options.
Thanks in advance!
If that doesn't help, please provide the VB reference, and maybe we can convert it. As for the cmdlet, I doubt it configures the SMTP service itself...
I saw that thread, but it utilizes the VBS script adsutil; I'm *really* trying to avoid going that route.
I think I may have it. This uses the ADSI reference mechanism to get and set parameters. I am testing it right now.
$SMTPServer = [ADSI]"IIS://localhost/smtpsvc/1"
$SMTPServer.RelayForAuth = -1
$SMTPServer.SetInfo()...and that failed.I think I need to add an SMTPServer.RelayIPList entry, but it must be in octal if I read correctly.