PowerShell: Checking the Syntax of an Exchange Mailbox Export Content Filter

A bit of a niche function this one.  When you perform a mailbox export in Exchange using the New-MailboxExportRequest cmdlet you can specify the ContentFilter parameter.  This allows you to pass an OPATH filter to only export SOME of the content from a mailbox.

One of the examples on the page above is;

New-MailboxExportRequest -Mailbox Tony -ContentFilter {(body -like “*company*”) -and (body -like “*profit*”) -and (Received -lt “01/01/2012”)}

So what if you need to check the syntax of a ContentFilter? Continue reading “PowerShell: Checking the Syntax of an Exchange Mailbox Export Content Filter”

Tales From IT: Cultural Differences

When I started as an IT dogs-body I was lucky enough to do quite a bit of travelling.  For a young guy this was awesome;  configure Exchange servers, see the world!  But it also meant I was hopelessly naive AND due to my extreme Britishness I didn’t speak any other languages (even English was ropy).

So I occasionally suffered from Culture Shock, like when I was sent to Rome to set up Exchange on short notice…  Continue reading “Tales From IT: Cultural Differences”

Brian Cox: Live

We went to see Brian Cox live at Wembley Arena recently and had a great time.  If you’re not familiar, he’s a physicist who appears on various TV and Radio shows about science.  He’s proven very popular because he makes the science interesting and fun without dumbing it down or over-simplifying it.

The Infinite Monkey Cage is a brilliant podcast to listen to if a humourous science panel show sounds like your thing. Continue reading “Brian Cox: Live”

XCOM 2: Long War 2 Guide and Tips (Spoiler-Free)

I love XCOM 2 and have got pretty good at it over the years.  All that experience didn’t make winning at Long War 2 (a semi-official full-conversion mod for the game) any easier though.  Lots of failure and knuckle-biting near misses meant it’s taken me a while to win a campaign.  There were loads of things I’d wish I’d known before I started that would either have made it easier or made some of the choices I was making clearer.  So here’s a dump of all my hard-won experience;  it might help you survive a few months longer…. Continue reading “XCOM 2: Long War 2 Guide and Tips (Spoiler-Free)”

PowerShell: Finding Invalid Mailboxes in Exchange

Mailboxes can me marked as invalid in Exchange;  this usually doesn’t affect the day-to-day function of the mailbox (usually) but it will prevent any changes happening to the object (using the standard Exchange tools).  However, whatever is causing those mailboxes to be marked as invalid might cause problems for other systems that use that directory (such as Office 365 or a meta-directory connected system).

To find all the mailboxes which are marked as invalid you can use the following command from an Exchange PowerShell Window;

Get-Mailbox | Where-Object {!$_.IsValid}

You can use the filter on Get-Mailbox to get a subset of data like;

Get-Mailbox -Filter {Office-Like "HQ"} | Where-Object {!$_.IsValid}

Once you’ve got a list invalid mailboxes you can remediate them