Exchange Online: Validate-OutboundConnector: Meet the coolest Cmdlet that I never knew about, until now.
Background:
I actually stumbled across a neat cmdlet that I have never noticed before, Validate-OutboundConnector. It basically allows you to observe and validate the route that your messages take through your connectors in the cloud.
The Who and the What:
Simply connect to remote powershell and run Validate-OutboundConnector -Identity "Connector Name" -Recipients "you@yourdomain.com" and you'll get a cool play by play of the hops your email takes to it's destination. You can also throw in the '-Verbose' switch
Below is an example that I ran, you can also run it with the '-Verbose' switch if you like.
PS C:\Users\Mitchel> Validate-OutboundConnector -Identity Outbound -Recipients blahblahblah8675309@hotmail.com
RunspaceId : 381ab9da-18d2-4f80-a44a-eea4f82cde89
TaskName : Connector Validation
IsTaskSuccessful : True
Timestamp:6/8/2015 8:54:43 AM
EventId:SEND
Source:SMTP
MessageSubject:Test email for connector validation
MessageId:<964f428e-c75e-490a-b272-1156932922b2@CY1PR0201MB1066.namprd02.prod.outlook.com>
Recipients:blahblahblah8675309@hotmail.com
RecipientCount:1
RecipientStatus:250 blahblahblah8675309@hotmail.com
SourceContext:;250
<964f428e-c75e-490a-b272-1156932922b2@CY1PR0201MB1066.namprd02.prod.outlook.com> Queued mail for
delivery;ClientSubmitTime:
Sender:O365ConnectorValidation@contoso.onmicrosoft.com
EventData:E2ELatency:2.813, ExternalSendLatency:1.969, Microsoft.Exchange.Hygiene.TenantOutboundConn
ectorCustomData:Name=Outbound;ConnectorType=Partner;UseMxRecord=True, ToEntity:Internet,
FromEntity:Unknown, MsgRecipCount:1, OutboundProxyTargetIPAddress:65.55.92.168,
OutboundProxyTargetHostName:mx3.hotmail.com, OutboundProxyFrontendName:BL2FFO11FD031,
DeliveryPriority:Normal, Oorg:contoso.onmicrosoft.com, OriginalFromAddress:<>,
AccountForest:NAMPR02A001.prod.outlook.com
; SubTasksResults = TaskName = blahblahblah8675309@hotmail.com; IsTaskSuccessful = True; TaskDetail = OK;
SubTasksResults = |
|}
Identity :
ObjectState : New
IsValid : True
You can confirm success on your end by looking for this value:
IsTaskSuccessful : True
Your recipient will get a nice test message confirming it:
It's also helpful if another admin from another company is blaming you/us unnecessarily, sending them this output is pretty hard to argue with. You can also script this to easily send in intervals or run against multiple connectors as well various other troubleshooting/monitoring scenarios.
I didn't see any real mention of it anywhere on the internet, so I decided to write a blog post in the interim. I hope it helps!
Mitchel
Comments
- Anonymous
June 10, 2015
thanks - Anonymous
July 29, 2015
Good one! - Anonymous
August 25, 2016
Great post which helps me a lot, thanks mate!!!