Set SharePoint 2010 Outgoing E-Mail Settings with PowerShell

Configure the outgoing email settings in a SharePoint 2010 Farm with PowerShell.

Launch the PowerShell ISE. Import the SharePoint PowerShell Snap-in, modify the script below using your specific email server settings and then run the script.

The outgoing email settings are now configured.



  1. steve

    Thanks but I am new to this powershell !! We have changed our exchange server and need to change the email name – I am unable to change throws up an error and run your script – not sure if you can advise me – cheers ( i tried putting own exchange server) then yours

    The term ‘Get-SPWebApplication’ is not recognized as the name of a cmdlet, function, scrip
    t file, or operable program. Check the spelling of the name, or if a path was included, ve
    rify that the path is correct and try again.
    At line:6 char:33
    + $CAWebApp = Get-SPWebApplication <<<< -IncludeCentralAdministration | Where { $_.IsAdmi
    nistrationWebApplication }
    + CategoryInfo : ObjectNotFound: (Get-SPWebApplication:String) [], CommandNo

    • henrik

      If you don’t run “SharePoint Management Shell” and just start powershell you will have to add the Sharepoint snap-in: asnp *sharepoint*
      *unless you do something about your powershell shortcut..

  2. Gabriel Mello Serrão

    Great article, dude! You saved me a lot of time. Thank you very much!


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: