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.

µ

3 Comments

  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
    tFoundException

    Reply
    • 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..

      Reply
  2. Gabriel Mello Serrão

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

    Reply

Leave a Reply

%d bloggers like this: