Export-MapiXML

Description

Exports an item as an XML file.

Syntax

Note: Parameters in orange are optional.

Export-MapiXML
-MapiItemMapiObject<Mapi.NET.Message>
-FileNameString
-OverwriteExistingString

Parameters

MapiItemA Mapi.NET.Message object that is the item to be exported.  Use Get-MapiItem to get an instance of this object type
FileNameA string value that is the full path and filename of the new XML file to be exported.
OverwriteExistingA optional SwitchParameter, which when present will cause an existing file with the same name to be overwritten

Remarks

This cmdlet exports and item to a msg file.

Note that the FileName parameter does not require that the file name end with the *.XML extension; any extension text is allowed. 

 

The XML output is a complete representation of ALL of the MAPI properties of the selected item, including the recipient table and attachments.  Binary data is base64 encoded, but is not compressed.  As such, XML output files can be much larger than the corresponding MAPI item.

PowerMAPI's PackedBinary format is a better and more efficient container for MAPI items and can be imported.  There is (currently) no PowerMAPI command to import from XML.