Get SharePoint 2010 SMTP Server with PowerShell

Because we monitor a lot of SharePoint servers we dont want to click through central admin if we want to know if anything has changed. The SMTP server is also something that we want to see with our summary script.

There are a couple of ways to get the SMTP Server name:

1. Using Central Administration

When navigating to ‘Central Administration –> System Settings –> Configure outgoing e-mail settings’

image

 

2. Using PowerShell

The following line of code can be filled in to get the configured SMTP Server using PowerShell

(get-spwebapplication)[0] | %{$_.outboundmailserviceinstance.server}

 

image

When we put this code with the below posts we already can view SharePoint 2010 edition, version and SMTP Server.

 

image

In the next couple of posts I will expand this script with managed paths, site collections, web applications, size, databases, service applications and solutions.

Leave a Reply

Your email address will not be published. Required fields are marked *