As an Exchange Admin, we work with various connectors such as Receive and Send connectors and once you set them up, especially in the Exchange Admin Center (EAC), not all information is visible and you need to use PowerShell to get other information. To open up the EAC and navigate to the send connector or connectors you have setup takes time and if you have locked down your environment, then the only thing you can use is PowerShell to get information.

I put together a small script to get the information I wanted as I was testing out a few things and wanted to see the information. Below is a sample output of the script:

Script showing send connector information


The script below has the above information displayed that I was looking for, you can customize it to show what you want to see, here is the script:

# Import the Exchange module
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn

# Get information about all Send Connectors
$SendConnectors = Get-SendConnector

# Display information about each Send Connector
foreach ($Connector in $SendConnectors) {
    Write-Host "Send Connector Name: $($Connector.Name)"
    Write-Host "  Identity: $($Connector.Identity)"
    Write-Host "  Source Transport Server: $($Connector.SourceTransportServers)"
    Write-Host "  Address Spaces: $($Connector.AddressSpaces -join ', ')"
    Write-Host "  DNS Routing Enabled: $($Connector.DnsRoutingEnabled)"
    Write-Host "  MaxMessageSize: $($Connector.MaxMessageSize)"
    Write-Host "  ConnectorType: $($Connector.ConnectorType)"
    Write-Host "  UseExternalDNSServersEnabled: $($Connector.UseExternalDNSServersEnabled)"
    Write-Host "  SmartHosts: $($Connector.SmartHosts -join ', ')"
    Write-Host "  ForceHELO: $($Connector.ForceHELO)"
    Write-Host "  TlsDomain: $($Connector.TlsDomain)"
    Write-Host "  Comment: $($Connector.Comments)"
    Write-Host "  Enabled: $($Connector.Enabled)"
    Write-Host "-------------------------"

The script has the Exchange Snapin in so you can run it from PowerShell ISE for example and it will give you the same output.

Hope it helps.

Discover more from Everything-PowerShell

Subscribe now to keep reading and get access to the full archive.

Continue reading