PowerShell Ironport functions

Unanswered Question
Dec 3rd, 2009

I've written some PowerShell functions for gathering data from Ironports (using the XML status pages). Kind of like the current Perl tools on the Ironport Support portal, but better 8)

I am using it to aggregate Top Hosts info, Ironport status etc from multiple Ironports. It sure beats logging in to each device over SSH and manually gathering data. Plus, PowerShell's built-in functionality makes filtering data and reporting a snap.

I'm willing to share what I have but wondered how much interest there would be.

Vote and if there's enough interest I'll polish what I have and stick it up.


[edit] Work on this continues, I am writing it as a PowerShell Module and will probably host it on poshcode.org. I'd say it's probably 85% complete. Stay tuned.
I had some positive feedback from our Ironport reps when I met up with them last week and showed them what I have done so far.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Donald Nash Mon, 12/21/2009 - 11:27

I voted for this over on the old forums where you had it posted as a poll. That seems to have been lost in the migration, so I'll re-affirm my answer here. I'm a perl hacker myself, but one of my co-workers is deep into PowerShell.

Jason Meyer Wed, 01/20/2010 - 07:13

I'm just starting to wade into the pool that is PowerShell, would enjoy seeing what your doing.

Sbabcock74 Fri, 04/27/2012 - 16:22

Looks like this thread is pretty dead - I visited while trying to figure out how to use powershell to get the delivery status on my SMAs.  I have a pretty good solution that uses powershell's ability to parse the status pages, which are in an XML format, and create a powershell object that you can then manipulate.  This would be useful if you want to export the status for logging or to send a snapshot of the SMA status via email.  Check it out!

Platform Team Thu, 05/03/2012 - 04:37

Yeah, this was my original post. Apologies if it it seems I lost interest - the timing for my poll was pretty poor, just before the old Ironport Nation got shut down IIRC, so it did get buried. I actually assumed there wasn't much interest and kept it for my own use only, and haven't really ever got it to the point of being able to release for general use.

What I do have works pretty well for me, although some parts need finishing off and polishing for public release. If there's still genuine interest now, I will happily spend some time to fix up the bugs and make available for download (and take feedback for improvements/enhancements).


  • PowerShell module (v2 only) - although can still be used in v1 by dot-sourcing if needed
  • All functions accept input from the pipeline, and output PowerShell objects to it
  • Inline help, including examples

Main exported functions :

  • Get-ESApage - for retreiving raw pages from API. Can specify 'status', 'tophosts' or 'hoststatus' XML pages
  • Get-TopHosts - gets a number (default =5) of top hosts from an Ironport ESA
  • Get-ESAstatus - gets useful status info from an Ironport ESA
  • Get-DNSstatus - gets DNS info from an Ironport ESA
  • Get-HostStatus - gets delivery status for a remote mail domain from an Ironport ESA

There are also some 'shortcut' / alias functions, which save time for common tasks.

Things I use this for:

  • Retrieving featurekey info from all my Ironport appliances at once (eg how long until my Sophos licenses expire?)
  • Gathering tophosts info from all my Ironport appliances, and sorting by active recipients to see domains that may be throttling us
  • Getting a view on how busy all my Ironport appliances are (CPU, Memory etc) at any given moment. I'm actually just working on getting the output of one of these functions into our monitoring application so we can graph stuff like messages in workqueue, unattempted recipients etc.

We actually don't have many Ironport devices, but even so it saves me quite a bit of time and effort doing things this way. I'd imagine if you have a large global mail system to administer it would be even more valuable.

Let me know (in this thread, or PM) if you'd like to know more, or want to see this PS module made available for download. I'm a busy guy, but it shouldn't take too long to whip it into shape - it's mainly just removing private info (hostnames etc) and trapping some errors that I need to work on.


Sbabcock74 Wed, 11/07/2012 - 11:56


Definately would like to see more about the functions that you have created for the IronPort appliances.  I'm especially interested in how you are doing graphing.  My post on Get-Mailbox.net provides some basics of connecting to the appliances with PowerShell and I am planning to add to this discussion about how to get IronPort delivery status.  Thanks!

Platform Team Mon, 11/12/2012 - 14:16

Hi Scott

We are now using Solarwinds SAM for monitoring, which allows the use of custom PowerShell scripts. I use a PS script to extract the number of active recipients (and other counters, like CPU, memory utilization etc) from the Ironport XML status page. This allows us to alert when the number of queued messages exceeds a threshold. SAM also graphs all counters, so we can view historic data too.

Apologies I haven't got any closer to releasing anything yet. It's still on my to-do list, but keeps getting bumped due to higher priority work.


This Discussion