Thursday, February 26, 2015

PowerShell + EAS : Getting Started

This is the first post on a series of blog posts concentrated around understanding Exchange ActiveSync Protocol as this is the underlying protocol which Mobile devices use in order to connect to the Exchange Server.

The whole idea is to be able to craft EAS requests and parse the Server responses using PowerShell in order to understand the protocol better.

Hint - Take a look at the cmdlet Invoke-WebRequest, it will be used to craft the Web requests later on.

Why I want to do this ?
Because when you start poking around you learn the Product better :).

This is a getting started post and I am following and porting most of the code already written in C# at to PowerShell.

This post is about giving you a hang of how to make Web Requests to an Exchange Server's EAS endpoint and parse them to get insight in the process.

Now if you setup mail for a User in a Mobile device and use Fiddler as reverse proxy to analyze the communication , you will see the below :

Skip Verification Checks

Add the below line of code to your Script if you don't bother to perform the Server certificate validation, this is only for testing Environments.


[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}