Attach-RMEExchangeMailbox
From PowerGUI Wiki
Establishes a connection to the live Exchange Server mailbox you specify.
Contents |
Syntax
Attach-RMEExchangeMailbox [-ServerName] <String> [[-MailboxDn] <String>] [<CommonParameters>]
Detailed Description
The Attach-RMEExchangeMailbox cmdlet establishes a connection to the live Exchange Server mailbox you specify.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| ServerName | Specifies the name of the live Exchange Server computer that hosts the mailbox you want to connect to. | true | true (ByValue, ByPropertyName) | |
| MailboxDn | Specifies the mailbox to connect to. The MailboxDn parameter can take any of the following values for the mailbox:
| false | true (ByPropertyName) |
Examples
Example 1
$target = Attach-RMEExchangeMailbox "S2K2000C" "Administrator" | 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-RMEExchangeMailbox cmdlet connects to the Administrator mailbox hosted on the Exchange Server named S2K2000C. The mailbox object is then piped to the Get-RMEFolder cmdlet that retrieves the Restored folder from the mailbox. The Restored folder object 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-RMEExchangeMailbox -ServerName "S2K2000C" -MailboxDn "Administrator" | 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 Overwrite
In the first line of this example, the Attach-RMEExchangeMailbox cmdlet connects to the Administrator mailbox hosted on the Exchange Server named S2K2000C. The mailbox object is then piped to the Get-RMEFolder cmdlet that retrieves the Restored folder from the mailbox. The Restored folder object 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 being restored overwrite all their duplicates found in the target folder.
