Link to home
Start Free TrialLog in
Avatar of cnl83
cnl83Flag for United States of America

asked on

Exchange powershell command error

I have an exchange issue migrating to office 365. Well Microsoft sent me an email to run the following command but it renders this error. I have not heard from them all weekend. Can someone help me running this command? The database is not in the default location. Its on the E: drive.

Microsoft Instructions:
Add the Extended-Rights permissions "Receive-As" to the mailbox database.
Eg: Run the following command in the Exchange Management Shell:
Add-ADPermission -Identity "Mailbox Database 201312345678" -User "AdminAccount" -ExtendedRights Receive-As
Replace the “Mailbox Database 201312345678” with the actual name of the mailbox database and the "AdminAccount" with the account you are using for the migration.
Once done, STOP the migration batch, remove the mailboxes that failed from the migration batch and START the migration batch.

error:
C:\Windows\system32>Add-ADPermission -Identity "Mailbox Database MDB02" -User "MYUSER" -ExtendedRights Receive-As
Mailbox Database MDB01 wasn't found. Please make sure you've typed it correctly.​
    + CategoryInfo          : NotSpecified: (:) [Add-ADPermission], ManagementObjectNotFoundException​
    + FullyQualifiedErrorId : [Server=EXCHANGE,RequestId=aae3534f-c98a-4f2b-90f6-428932f700ab,TimeStamp=4/19/2019 11:3​
   3:16 PM] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 33F5A38B,Microsoft.Exchange.Management.Recipie
  ntTasks.AddADPermission​
    + PSComputerName        : myexchange.localdomain.local
Avatar of Matt Fields
Matt Fields

Make sure that you're running the command from your on premises exchange shell (not exchange online shell). You'll want to double check the name of your database too. It's telling you the database you provided doesn't exist which leads me to believe you either typo'd (should it be just MDB01?) or you're using the exchange online powershell session.
Avatar of cnl83

ASKER

The edb file is mdb02. Is not the the db?
ASKER CERTIFIED SOLUTION
Avatar of Matt Fields
Matt Fields

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can also do a get-mailboxdatabase and then copy and past the exact mailbox name you want add the permission to, that way you won't have any typos :)
Avatar of cnl83

ASKER

Thanks for both responses!