SOLVED

Missing "Restore-RecoverableItems" from the Exchange Module

Iron Contributor

Hello, i am missing the Get/Restore-RecoverableItems cmdlets, eg they are not found when i try to run them.

 

Screen Shot 2018-05-27 at 8.25.19 pm.png

 

The documentation says that the cmdlets are in the "Exchange" module.

 

Screen Shot 2018-05-27 at 8.18.34 pm.png

 

 

 

 

 

The documentation doesn't say, but other blogs, articles as well as MS support, say that i need the "Mailbox Import Export" role.. Well i have it, and have had it for years..

Screen Shot 2018-05-27 at 8.22.27 pm.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MS support are shrugging with helpful comments like "hmmm it works for me".

 

My tenant is in AU region, could the modules not be updated in my region yet?  Can i connect to another region somehow?

 

Get-RecoverableItems: https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-recoverableitems?view=exch...

9 Replies
best response confirmed by AndrewX (Iron Contributor)
Solution

I wrote about this topic in March https://www.petri.com/recovering-deleted-email-exchange-online. At that time, the cmdlets had been deployed in the U.S. and EMEA and probably elsewhere (except the sovereign clouds, which are always different). Some people complained at the time that they couldn't see the cmdlets, but no one has asked recently, so I assume that the roll-out is complete. Making sure that the account that logs into PowerShell has the Mailbox Import Export role (and admin permissions) is key. Is there any possibility that your account is missing the role? Perhaps you can remove the role, log out, wait five minutes, reassign the role, sign out again, and then try... Just to be sure.

An easy way to check whether the cmdlet is available for your tenant is to run this:

 

Get-ManagementRole -Cmdlet Restore-RecoverableItems

Name                  RoleType
----                  --------
Mailbox Import Export MailboxImportExport

And yes, as seen from the above that's the role you need. If it's missing from the output, then the rollout has not completed for your tenant, or perhaps there is a different issue that you should address with support. 

Thanks all..

 

I'm guessing it just took a long time for the permissions to replicate..  Anyway, its working now.

I tried what you asked for but it seems like it's not working.  @Tony Redmond 

@ashwani1 Does your account hold the Mailbox Import Export role? If it doesn't, you won't see the cmdlet.

 

I tried what you asked for but it seems like it's not working.  @Tony Redmond

PFAScreenshot (35).png

Screenshot (34).png

 

Restore-RecoverableItems is an ExO cmdlet, and you are connecting to the SCC PowerShell endpoint.

@Vasil Michev It definitely doesn't help when you try and use a cmdlet that's in another module...

Issue is related to Module install for the Powershell

Please run get-module 

once you have the Output please run Get-module -name xxxyyy | fl

 

Check if the Module has Powershell command listed in it

 

@mukku18 

1 best response

Accepted Solutions
best response confirmed by AndrewX (Iron Contributor)
Solution

I wrote about this topic in March https://www.petri.com/recovering-deleted-email-exchange-online. At that time, the cmdlets had been deployed in the U.S. and EMEA and probably elsewhere (except the sovereign clouds, which are always different). Some people complained at the time that they couldn't see the cmdlets, but no one has asked recently, so I assume that the roll-out is complete. Making sure that the account that logs into PowerShell has the Mailbox Import Export role (and admin permissions) is key. Is there any possibility that your account is missing the role? Perhaps you can remove the role, log out, wait five minutes, reassign the role, sign out again, and then try... Just to be sure.

View solution in original post