Export-RMEAttachment
From PowerGUI Wiki
Exports attachments to the location you specify.
Contents |
Syntax
Export-RMEAttachment [-Attachments] <Object> [-ExportPath] <String> [-GenerateHash] [-NamingOptions <TargetNamingOptions>] [-ApplySecurity] [<CommonParameters>]
Detailed Description
The Export-RMEAttachment cmdlet exports attachments to the location you specify.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Attachments | Specifies the attachments you want to export. Enter a variable that contains the attachment objects or type a command or expression that gets the attachment objects. | true | true (ByValue, ByPropertyName) | |
| ExportPath | Specifies the path to the location where target files will be created. | true | false | |
| GenerateHash | Specifies to create an .md5 hash file for each generated target file. The .md5 hash files are created in the same folder as the target files. | false | false | |
| NamingOptions | Specifies naming options for the generated target files.
This parameter can take one or both of the following values:
If specifying both values, delimit them with a comma. | false | false | |
| ApplySecurity | Applies the access permissions you set in the Recovery Manager console to the target files generated in the result of the restore operation. | 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.
