Take the 2-minute tour ×
Server Fault is a question and answer site for 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 '13 at 16:21

This question came from our site for SharePoint enthusiasts.

    
This doesn't actually work, at least in Windows 2008. It puts a Red X over the SMTP server but telnet tests to port 25 show that its not really working, at least not for me –  mark Aug 7 '14 at 7:56

1 Answer 1

up vote 2 down vote accepted

To Start:

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

To Stop:

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