Get-RMEAttachment
From PowerGUI Wiki
Retrieves attachments from the messages that match the criteria you specify.
Contents |
Syntax
Get-RMEAttachment [-Container <IMapiContainer>] [-SearchFile <String>] [-ExcludeSubFolders] [-From <String>] [-To <String>] [-MessageClass <String>] [-Category <String>] [-Conversation <String>] [-Importance <Importance>] [-SearchIn <SearchIn>] [-AttachmentOptions <AttachmentOptions>] [-MailboxNameInclude <String>] [-MailboxNameExclude <String>] [-MailboxServerName <String>] [-MailboxesWithMessages] [-FolderNameInclude <String>] [-FolderNameExclude <String>] [-FolderText <String>] [-FolderSearchIn <FolderSearchIn>] [-AttachmentNameInclude <String>] [-AttachmentNameExclude <String>] [-AttachmentText <String>] [-Text <String>] [-TextCaseSensitive] [-TextWholeWord] [-MessageSizeEquals <Int32>] [-MessageSizeLess <Int32>] [-MessageSizeGreater <Int32>] [-TimeAfter <DateTime>] [-TimeBefore <DateTime>] [-TimeMatch <MatchTime>] [-MailboxSizeEquals <Int32>] [-MailboxSizeLess <Int32>] [-MailboxSizeGreater <Int32>] [-MailboxMessageCountEquals <Int32>] [-MailboxMessageCountLess <Int32>] [-MailboxMessageCountGreater <Int32>] [-FolderMessageCountEquals <Int32>] [-FolderMessageCountLess <Int32>] [-FolderMessageCountGreater <Int32>] [-AttachmentSizeEquals <Int32>] [-AttachmentSizeLess <Int32>] [-AttachmentSizeGreater <Int32>] [<CommonParameters>]
Detailed Description
The Get-RMEAttachment cmdlet retrieves attachments from the messages that match the criteria you specify. You can retrieve attachments by various criteria, such as message content and date and time of message creation.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Container | Specifies the container from which you want to retrieve attachments. Enter a variable that includes the container object or type a command or expression that gets the container object. | false | false | |
| SearchFile | Specifies the full path to the Recovery Manager Search (.rmxs) file that holds search criteria for the attachments you want to retrieve. The search criteria in the specified file override all other parameters of this cmdlet. | false | false | |
| ExcludeSubFolders | Causes the command to only retrieve attachments from the messages located in the root of the container specified in the Container parameter. If the ExcludeSubFolders parameter is omitted, attachments are retrieved from the messages located in the root and all subfolders of the specified container. | false | false | |
| From | Causes the command to retrieve attachments from the messages originated from the senders specified in this parameter. | false | false | |
| To | Causes the command to retrieve attachments from the messages sent to the recipients specified in this parameter. | false | false | |
| MessageClass | Causes the command to retrieve attachments from the messages that belong to one or more message classes specified in this parameter. | false | false | |
| Category | Causes the command to retrieve attachments from the messages that belong to one or more Microsoft Outlook categories specified in this parameter. | false | false | |
| Conversation | Causes the command to retrieve attachments from the messages that belong to one or more conversation threads specified in this parameter. | false | false | |
| Importance | Causes the command to retrieve attachments from the messages that have the importance specified in this parameter. | false | false | |
| SearchIn | Specifies the message elements you want to search for the keywords specified in the Text parameter. The SearchIn parameter can take any of the following values for the message elements:
If using multiple values, delimit each value with a comma. | false | false | |
| AttachmentOptions | This parameter cannot be used with the Get-RMEAttachment cmdlet. | false | false | |
| MailboxNameInclude | Causes the command to retrieve attachments from the messages located in the mailboxes whose names include the keywords specified in this parameter. | false | false | |
| MailboxNameExclude | Causes the command to retrieve attachments from the messages located in the mailboxes whose names exclude the keywords specified in this parameter. | false | false | |
| MailboxServerName | Causes the command to retrieve attachments from the messages located in the mailboxes hosted on the servers whose names include the keywords specified in this parameter. | false | false | |
| MailboxesWithMessages | This parameter cannot be used with the Get-RMEAttachment cmdlet. | false | false | |
| FolderNameInclude | Causes the command to retrieve attachments from the messages located in the folders whose names include the keywords you specify in this parameter. | false | false | |
| FolderNameExclude | Causes the command to retrieve attachments from the messages located in the folders whose names exclude the keywords you specify in this parameter. | false | false | |
| FolderText | Causes the command to retrieve attachments from the messages located in the folders whose elements include the keywords you specify in this parameter. To specify the folder elements where you want to look for keywords, use the FolderSearchIn parameter. | false | false | |
| FolderSearchIn | Use this parameter to specify the folder elements you want to search for keywords. This parameter can take any of the following values for the folder elements:
If using multiple values, delimit each value with a comma. | false | false | |
| AttachmentNameInclude | Causes the command to retrieve the attachments whose names include the keywords specified in this parameter. | false | false | |
| AttachmentNameExclude | Causes the command to retrieve the attachments whose names exclude the keywords specified in this parameter. | false | false | |
| AttachmentText | Causes the command to retrieve the attachments including the keywords specified in this parameter. | false | false | |
| Text | Causes the command to retrieve attachments from the messages that include the keywords specified in this parameter. | false | false | |
| TextCaseSensitive | Enables a case-sensitive search of keywords. | false | false | |
| TextWholeWord | Enables search for the whole matching keywords. | false | false | |
| MessageSizeEquals | Causes the command to retrieve attachments from the messages whose size equals the value specified in this parameter. Use this parameter to specify the message size in kilobytes. | false | false | |
| MessageSizeLess | Causes the command to retrieve attachments from the messages whose size is less than the value specified in this parameter. Use this parameter to specify the message size in kilobytes. | false | false | |
| MessageSizeGreater | Causes the command to retrieve attachments from the messages whose size is greater than the value specified in this parameter. Use this parameter to specify the message size in kilobytes. | false | false | |
| TimeAfter | Specifies the start date of the time period when the messages from which you want to retrieve attachments were sent, received, created, modified, or deleted. | false | false | |
| TimeBefore | Specifies the end date of the time period when the messages from which you want to retrieve attachments were sent, received, created, modified, or deleted. | false | false | |
| TimeMatch | Causes the command to retrieve attachments from the messages that were sent, received, created, modified, or deleted on specific date and time. This parameter can take any of the following values:
If using multiple values, delimit each value with a comma. | false | false | |
| MailboxSizeEquals | Causes the command to retrieve attachments from the messages located in the mailboxes whose size equals the value specified in this parameter. Use this parameter to specify the mailbox size in kilobytes. | false | false | |
| MailboxSizeLess | Causes the command to retrieve attachments from the messages located in the mailboxes whose size is less than the value specified in this parameter. Use this parameter to specify the mailbox size in kilobytes. | false | false | |
| MailboxSizeGreater | Causes the command to retrieve attachments from the messages located in the mailboxes whose size is greater than the value specified in this parameter. Use this parameter to specify the mailbox size in kilobytes. | false | false | |
| MailboxMessageCountEquals | Causes the command to retrieve attachments from the messages located in the mailboxes where the number of messages equals the value specified in this parameter. | false | false | |
| MailboxMessageCountLess | Causes the command to retrieve attachments from the messages located in the mailboxes where the number of messages is less than the value specified in this parameter. | false | false | |
| MailboxMessageCountGreater | Causes the command to retrieve attachments from the messages located in the mailboxes where the number of messages is greater than the value specified in this parameter. | false | false | |
| FolderMessageCountEquals | Causes the command to retrieve attachments from the messages located in the folders where the number of messages equals the value specified in this parameter. | false | false | |
| FolderMessageCountLess | Causes the command to retrieve attachments from the messages located in the folders where the number of messages is less than the value specified in this parameter. | false | false | |
| FolderMessageCountGreater | Causes the command to retrieve attachments from the messages located in the folders where the number of messages is greater than the value specified in this parameter. | false | false | |
| AttachmentSizeEquals | Causes the command to retrieve the attachments whose size equals the value specified in this parameter. Use this parameter to specify the attachment size in kilobytes. | false | false | |
| AttachmentSizeLess | Causes the command to retrieve the attachments whose size is less than the value specified in this parameter. Use this parameter to specify the attachment size in kilobytes. | false | false | |
| AttachmentSizeGreater | Causes the command to retrieve the attachments whose size is greater than the value specified in this parameter. Use this parameter to specify the attachment size in kilobytes. | false | false |
Examples
Example 1
Attach-RMEExchangeDB -EdbPath "C:\Data\Edb\EdbSearchTest\EdbSearchTest.edb" | Get-RMEAttachment | Export-RMEAttachment -ExportPath "C:\Data\RestoredAttachments"
The Attach-RMEExchangeDB cmdlet connects to the EdbSearchTest.edb mailbox store database and pipes it to the Get-RMEAttachment cmdlet. The Get-RMEAttachment cmdlet then retrieves all attachments from the mailbox store database and pipes them to the Export-RMEAttachment cmdlet that saves the attachments in the "C:\Data\RestoredAttachments" folder.
Example 2
Attach-RMEExchangeDB "C:\Data\Edb\EdbSearchTest\EdbSearchTest.edb" | Get-RMEAttachment -SearchIn Subject -Text "test" | Export-RMEAttachment -ExportPath "C:\Data\RestoredAttachments"
The Attach-RMEExchangeDB cmdlet connects to the EdbSearchTest.edb mailbox store database and pipes it to the Get-RMEAttachment cmdlet. The Get-RMEAttachment cmdlet then retrieves all attachments from the messages whose subject contains the word "test" and pipes them to the Export-RMEAttachment cmdlet that saves the attachments in the "C:\Data\RestoredAttachments" folder.
Example 3
Attach-RMELotusDB "C:\Data\Nsf" | Get-RMEAttachment -SearchIn Subject, Body -Text "test" | Export-RMEAttachment -ExportPath "C:\Data\RestoredAttachments"
The Attach-RMELotusDB cmdlet connects to all Lotus Notes databases (.nsf files) found in the "C:\Data\Nsf" folder. The .nsf file objects are then piped to the Get-RMEAttachment cmdlet that retrieves all attachments from the messages whose subject or body includes the word "test". The retrieved attachment objects are then piped to the Export-RMEAttachment cmdlet that saves the attachments in the "C:\Data\RestoredAttachments" folder.
Example 4
Attach-RMEPersonalDB "C:\Data\Pst\MapiTest.pst" | Get-RMEAttachment | Export-RMEAttachment -ExportPath "C:\Data\RestoredAttachments" -ApplySecurity
The Attach-RMEPersonalDB cmdlet connects to the MapiTest.pst file and pipes it to the Get-RMEAttachment cmdlet that retrieves all attachments from the file. The retrieved attachment objects are then piped to the Export-RMEAttachment cmdlet that saves the attachments in the "C:\Data\RestoredAttachments" folder and applies the access permissions specified in the Recovery Manager console to all the restored attachments.
