Thursday, February 26, 2015

Exchange 2013 New-MailboxRestoreRequest :: The term 'New-MaiboxRestoreRequest' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Issue : From Exchange management Shell, Running command is providing this error


New-MailboxRestoreRequest –SourceDatabase <Source-Database> -SourceStoreMailbox <Disconnected-Mailbox> -TargetMailbox <Destination-Mailbox> -TargetRootFolder <Folder-in-Destination-Mailbox> -AllowLegacyDNMismatch


New-MaiboxRestoreRequest : The term 'New-MaiboxRestoreRequest' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ New-MaiboxRestoreRequest -SourceDatabase "recovery" -SourceStoreMailbox "dd ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : ObjectNotFound: (New-MaiboxRestoreRequest:String) [], CommandNotFoundException
   + FullyQualifiedErrorId : CommandNotFoundException 



Resolution: Open EMS in Administrator mode and run the command again



 -AllowLegacyDNMismatch : this switch will allow to restore Database into different location from the original


To receive GUID for the user

Get-MailboxStatistics –Database recoveryDatabase | ft DisplayName,MailboxGUID,DisconnectReason –AutoSize

Get-MailboxRestoreRequest //This command can helpus to check with restore status

Create Recovery Database
New-MailboxDatabase -Recovery -Name RDB1 -Server MBX2
New-MailboxDatabase -Recovery -Name RDB2 -Server MBX1 -EdbFilePath "C:\Recovery\RDB2\RDB2.EDB" -LogFolderPath "C:\Recovery\RDB2"

Get-MailboxDatabase <RecoveryDatabaseName> | Format-List
New-MailboxRestoreRequest -SourceDatabase DB1 -SourceStoreMailbox 1d20855f-fd54-4681-98e6-e249f7326ddd -TargetMailbox Morris

Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest

No comments:

Post a Comment