Attach-RMEPersonalDB
From PowerGUI Wiki
Establishes a connection to the specified Personal Folders (.pst) file.
Contents |
Syntax
Attach-RMEPersonalDB [-PstPath] <String> [<CommonParameters>]
Detailed Description
The Attach-RMEPersonalDB cmdlet establishes a connection to the Personal Folders (.pst) file you specify.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| PstPath | Specifies the path to the Personal Folders (.pst) file you want to connect to. | true | true (ByValue, ByPropertyName) |
Examples
Example 1
$target = Attach-RMEPersonalDB -PstPath "C:\Data\Pst\Test.pst" | Get-RMEFolder "Restored" C:\PS>Attach-RMEExchangeDB "C:\Data\Edb\EdbSearchTest\EdbSearchTest.edb" | Get-RMEFolder "John Doe\Inbox" | Get-RMEMessage | Restore-RMEMessage -TargetFolder $target
In the first line of this example, the Attach-RMEPersonalDB cmdlet connects to the Test.pst file and pipes it to the Get-RMEFolder cmdlet that retrieves the Restored folder from the file. The Restored folder is then saved in the $target variable.
In the second line of this example, a connection is established to the EdbSearchTest.edb mailbox store database, and all messages are retrieved from the Inbox folder in the John Doe mailbox. The retrieved messages are then restored to the folder saved in the $target variable.
Example 2
$target = Attach-RMEPersonalDB "C:\Data\Pst\Test.pst" | Get-RMEFolder "Restored" C:\PS>Attach-RMEExchangeDB "C:\Data\Edb\EdbSearchTest\EdbSearchTest.edb" | Get-RMEFolder "John Doe\Inbox" | Get-RMEMessage | Restore-RMEMessage -TargetFolder $target -DuplicateAction Skip
In the first line of this example, the Attach-RMEPersonalDB cmdlet connects to the Test.pst file and pipes it to the Get-RMEFolder cmdlet that retrieves the Restored folder from the file. The Restored folder is then saved in the $target variable.
In the second line of this example, a connection is established to the EdbSearchTest.edb mailbox store database, and all messages are retrieved from the Inbox folder in the John Doe mailbox. The retrieved messages are then restored to the folder saved in the $target variable. The messages whose duplicates are found in the target folder will not be restored.
Example 3
Attach-RMEPersonalDB "C:\Data\Pst\MapiTest.pst" | Get-RMEMessage | Export-RMEMessage -ExportPath "C:\Data\Exported\Txt" -Type Txt
The Attach-RMEPersonalDB cmdlet connects to the MapiTest.pst file and pipes it to the Get-RMEMessage cmdlet that retrieves all messages from the file. The retrieved message objects are then piped to the Export-RMEMessage cmdlet that saves each message as a .txt file in the "C:\Data\Exported\Txt" folder.
