Get-RMEMessage
From PowerGUI Wiki
Retrieves the messages that match the criteria you specify.
Contents |
Syntax
Get-RMEMessage [-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-RMEMailbox cmdlet retrieves the messages that match the criteria you specify. You can retrieve messages 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 messages. 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 messages 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 messages from the root of the container specified in the Target parameter. If the ExcludeSubFolders parameter is omitted, messages are retrieved from the root and all subfolders of the specified container. | false | false | |
| From | Causes the command to retrieve messages from the senders specified in this parameter. | false | false | |
| To | Causes the command to retrieve messages to the recipients specified in this parameter. | false | false | |
| MessageClass | Causes the command to retrieve the messages that belong to one or more message classes specified in this parameter. | false | false | |
| Category | Causes the command to retrieve the messages that belong to one or more Microsoft Outlook categories specified in this parameter. | false | false | |
| Conversation | Causes the command to retrieve the messages that belong to one or more conversation threads specified in this parameter. | false | false | |
| Importance | Causes the command to retrieve 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 | Causes the command to retrieve messages by the attachment criteria. This parameter can take one of the following values:
| false | false | |
| MailboxNameInclude | Causes the command to retrieve messages from the mailboxes whose names include the keywords specified in this parameter. | false | false | |
| MailboxNameExclude | Causes the command to retrieve messages from the mailboxes whose names exclude the keywords specified in this parameter. | false | false | |
| MailboxServerName | Causes the command to retrieve messages from 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-RMEMessage cmdlet. | false | false | |
| FolderNameInclude | Causes the command to retrieve messages from the folders whose names include the keywords you specify in this parameter. | false | false | |
| FolderNameExclude | Causes the command to retrieve messages from the folders whose names exclude the keywords you specify in this parameter. | false | false | |
| FolderText | Causes the command to retrieve messages from the folders whose elements include the keywords you specify in this 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 messages that contain attachments whose names include the keywords specified in this parameter. | false | false | |
| AttachmentNameExclude | Causes the command to retrieve the messages that contain attachments whose names exclude the keywords specified in this parameter. | false | false | |
| AttachmentText | Causes the command to retrieve the messages that contain attachments including the keywords specified in this parameter. | false | false | |
| Text | Causes the command to retrieve 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 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 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 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 you want to retrieve were sent, received, created, modified, or deleted. | false | false | |
| TimeBefore | Specifies the end date of the time period when the messages you want to retrieve were sent, received, created, modified, or deleted. | false | false | |
| TimeMatch | Causes the command to retrieve 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 messages from 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 messages from 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 messages from 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 messages from the mailboxes where the number of messages equals the value specified in this parameter. | false | false | |
| MailboxMessageCountLess | Causes the command to retrieve messages from the mailboxes where the number of messages is less than the value specified in this parameter. | false | false | |
| MailboxMessageCountGreater | Causes the command to retrieve messages from the mailboxes where the number of messages is greater than the value specified in this parameter. | false | false | |
| FolderMessageCountEquals | Causes the command to retrieve messages from the folders where the number of messages equals the value specified in this parameter. | false | false | |
| FolderMessageCountLess | Causes the command to retrieve messages from the folders where the number of messages is less than the value specified in this parameter. | false | false | |
| FolderMessageCountGreater | Causes the command to retrieve messages from 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 messages that contain 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 messages that contain 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 messages that contain 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-RMEMessage | Export-RMEMessage -ExportPath "C:\Data\Exported\Msg" -Type Msg
The Attach-RMEExchangeDB cmdlet connects to the EdbSearchTest.edb mailbox store database and pipes it to the Get-RMEMessage cmdlet. The Get-RMEMessage cmdlet then retrieves all messages from the mailbox store database and pipes them to the Export-RMEMessage cmdlet that saves each message as a .msg file in the “C:\Data\Exported\Msg” folder.
Example 2
Attach-RMEExchangeDB "C:\Data\Edb\EdbSearchTest\EdbSearchTest.edb" | Get-RMEMessage -SearchIn Subject -Text "test" | Export-RMEMessage -ExportPath "C:\Data\Exported\AM" -Type ArchiveManager -ArchiveManagerVersion 3.8
The Attach-RMEExchangeDB cmdlet connects to the EdbSearchTest.edb mailbox store database and pipes it to the Get-RMEMessage cmdlet. The Get-RMEMessage cmdlet then retrieves all messages whose subject contains the word "test" and pipes them to the Export-RMEMessage cmdlet that saves the messages in the Quest Archive Manager drop directory (C:\Data\Exported\AM) for their subsequent import into Archive Manager version 3.8.
Example 3
Attach-RMELotusDB "C:\Data\Nsf" | Get-RMEMessage -SearchIn Subject, Body -Text "test" | Export-RMEMessage -ExportPath "C:\Data\Exported\Eml" -Type Eml
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-RMEMessage cmdlet that retrieves all messages whose subject or body includes the word "test". The retrieved message objects are then piped to the Export-RMEMessage cmdlet that saves each message as an .eml file in the "C:\Data\Exported\Eml" folder.
