Fetch all remote SMTP servers from Exchange receive connector logs
This scripts fetches remote SMTP servers by searching the Exchange receive connector logs for the EHLO string. Fetched remote servers can be exported to a single CSV file for all receive connectors across Exchange Servers or exported to a separate CSV file per Exchange Server.
- Exchange Server 2010, Exchange Server 2013+
List of Exchange servers, modern and legacy Exchange servers cannot be mixed
Search backend transport (aka hub transport) log files, instead of frontend transport, which is the default
Search legacy Exchange servers (Exchange 2010) log file location
Export search results to a single CSV file for all servers
Export search results to a separate CSV file per servers
File selection filter, -5 will select log files changed during the last five days. Default: -10
.\Get-RemoteSmtpServers.ps1 -Servers SRV01,SRV02 -LegacyExchange -AddDays -4 -ToCsv
Search legacy Exchange servers SMTP receive log files for the last 4 days and save search results in a single CSV file
THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
Written by: Thomas Stensitzki | MVP
- My Blog: http://justcantgetenough.granikos.eu
- Twitter: https://twitter.com/stensitzki
- LinkedIn: http://de.linkedin.com/in/thomasstensitzki
- Github: https://github.com/Apoc70
- MVP Blog: https://blogs.msmvps.com/thomastechtalk/
- Tech Talk YouTube Channel (DE): http://techtalk.granikos.eu
For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos
- Blog: http://blog.granikos.eu
- Website: https://www.granikos.eu/en/
- Twitter: https://twitter.com/granikos_de