Compares the properties of 2 objects.

The comparison can show the values that differ between 2 objects, or can show all values including differences.

This cmdlet is useful for tracking changes of an item as it is modified.


Note: Parameters in orange are optional.



PropObjectAn IMapiObject interface that represents any object that has properties.  This can be a message, folder, attachment, recipient, store, etc.
CompareToAn IMapiObject interface that represents the object to compare to PropObject.
OnlyShowDifferencesWhen this switch is present, the output is filtered to only show values that are different between the two objects.

This cmdlet is used to compare one object's values with another.When working with items in mailboxes, there are times when one would like to know the effect of an action on an item.  Using this cmdlet, one can get 2 instances of the same object, one before the change, and one after and compare the differences.For example, if one wanted to know what attributes change when a message changes from Unread to Read, Compare-MapiProps could show which values of the message changed.