Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Because of some error on my server my SMTP [SMTP Virtual Server #1] stop. I wanted to create job which will run periodic timely and check the SMTP server status, If its stop then it will start it again.

My admin team working on the issue. I wanted to use this temporary solution.

Any hemp appropriated.... :)enter image description here

I have used Start-Service "SMTPSVC" its work but its start UATSERV but not started SMTP Virtual Server #1 (Please have a look of the attached image)

share|improve this question

migrated from sharepoint.stackexchange.com Jan 15 at 16:21

1 Answer

up vote 2 down vote accepted

To Start:

$SMTP=[adsi]"IIS://localhost/SMTPSVC/1"
$SMTP.ServerState = 4
$SMTP.SetInfo()

To Stop:

$SMTP=[adsi]"IIS://localhost/SMTPSVC/1"
$SMTP.ServerState = 2
$SMTP.SetInfo()
share|improve this answer
By Mistake you are entered wrong ServerState for START & STOP the SMTP. – Dilip Nikam Feb 14 at 6:39
ServerState 2 For START & ServerState 4 for STOP. Thanks Again.... – Dilip Nikam Feb 14 at 6:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.