We recently migrated from Exchange 2003 to Exchange 2010. In 2003, there used to be a report/notification that was sent out every night that summarized what was purged from mailboxes based on the retention policy. My research found that this report/notification does not exist in 2010. I have written a PowerShell script utilizing the EWS dll that (I thought) approximated the information from that report. However, I have since learned that the retention policy works slightly differently on items in the Deleted Items folder, wherein the policy tags each item with an expire date based on when it was deleted (not based on arrival date).
So, my question is how to query the expire date of the retention tag. I had found a post somewhere (I can't find it again) that made reference to the MS-OCXMSG specification, which I found in the MSDN library, but I'm not sure how to reference it from PowerShell and I haven't been able to find examples of how to reference/use it (or if I need to download/install additional dll's). It has a PidTagRetentionDate Property that seems like should be the data I'm looking for. I just don't know how to reference it. Thru EWS, I am already drilling down to each Message Item in the folder. I just need help with this MS-OCXMSG property from there.
If anyone has some code examples of how to reference and use MS-OCXMSG in PowerShell, I would be very appreciative.
Thanks,
Eric