A while ago I wrote a script that reads Microsoft 365 security information and exports it to a JSON data file. The idea is that you can take this data file and use it with your AI of choice. I have now developed a similar script but for Exchange Online information.
When you run the script it will connect to Exchange online and extract the information from a variety of locations
It will produce 2 output JSON files in the parent directory. The standard data file can be quite large, in the case above it is around 15MB. The other file produced is more ‘compact’ around 100 – 200KB
You can then take either of these JSON files and feed them into you AI system of choice. The above shows you the result when I fed it into Copilot Researcher.,
and I even got a nice Word document when I fed it into Claude online.
You can download the script here:
https://github.com/directorcia/Office365/blob/master/Analysis/Exchange/exo-extract.ps1
and find the documentation here:
https://github.com/directorcia/Office365/wiki/Extract-Exchange-Online-information
as well as a long prompt you can use with your Ai of choice here:
https://github.com/directorcia/Office365/blob/master/Analysis/Exchange/prompt-long.txt
Given that email systems are typically at the highest security risk, this script shoudl allow you to quickly and easily evaluate its posture as well as giving you a range of improvement suggestions.