introlux
asked on
Auto Start Virtual SMTP - Windows Server 2008 R2
Hi,
We are experiencing issues where Virtual SMTP stop, I am aware of the following scripts to start and stop the service:
To Start:
$SMTP=[adsi]"IIS://localho st/SMTPSVC /1"
$SMTP.ServerState = 2
$SMTP.SetInfo()
To Stop:
$SMTP=[adsi]"IIS://localho st/SMTPSVC /1"
$SMTP.ServerState = 4
$SMTP.SetInfo()
Any idea how I can put this in a script to check the service is in a stop state (4) and if so to start it and it into state 2.
Regards,
introlux
We are experiencing issues where Virtual SMTP stop, I am aware of the following scripts to start and stop the service:
To Start:
$SMTP=[adsi]"IIS://localho
$SMTP.ServerState = 2
$SMTP.SetInfo()
To Stop:
$SMTP=[adsi]"IIS://localho
$SMTP.ServerState = 4
$SMTP.SetInfo()
Any idea how I can put this in a script to check the service is in a stop state (4) and if so to start it and it into state 2.
Regards,
introlux
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, if you look into the IIS SMTP logs (you have logging enabled, right?), is there any event that occurs right before the SMTP site goes offline?
Dan