|Message||A Mapi.NET.Message from which an attachment is saved.|
|AttachmentNumber||A System.Int32 value which identifies the specific attachment in the attachment table of the message.|
|Attach||A Mapi.NET.Attachment object from which to save to a file.|
|SaveToPath||A text string that represents the file system folder into which to create and save the attachment.|
|FileName||An optional text string that is used for the file name. If omitted, attachment metadata is used.|
|OverwriteExisting||A SwitchParameter which, if present, allows for overwriting an existing file with the same name.|
This cmdlet saves attachment data as a file in a file system.
Attachments on messages are identified by an index number. Use Get-MapiAttach to get the attachment number of an attachment.
Attachments can be "hidden" from standard mail clients. For example, inline graphics of an HTML message body are stored as attachments, but have flags to prevent them from appearing as "attachments" when rendered in a client application. This cmdlet can save any attachment, hidden or visible, however non-visible attachements sometimes do not have filename metadata and may require the use of the Filename parameter.
Attachments can also be stored in a Structured Storage format (also known as MSG files). This is most commonly found when a user attaches another email message to a message. This cmdlet will save such attachments as MSG files.
Note that accessing and saving attachments from messages in an Exchange mailbox may incur network activity. Large attachments may take some time to save since MAPI will have to wait on network operations for streaming the data locally.