Exchange 2013 Hybrid - How do I check the MailboxStatistics of an In-Place Archive hosted in O365 for a User with an On-premise Mailbox?

We have Exchange 2013 on-premise with In-Place Archives hosted in Office365.  I want to run get-mailboxstatistics against my hosted archive to check out statistics on the user of the archives.  

I've connected to O365 with a new-pssession and imported the msonline module in PowerShell.

However, I get this error:

[PS] C:\Windows\system32>Get-Mailboxstatistics blahblahblah -archive

"The user 'blah blah blah' has a cloud-based archive. Currently, you can't run Get-MailboxStatistics -Archive on a
cloud-based archive."

Any ideas?

August 31st, 2015 4:05pm

What exact steps are you using to connect to ExO?

Should be something like:

$Cred = Get-Credential

$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic AllowRedirection

Import-PSSession $s

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 5:36pm

Hi,

Please refer to Andy's suggestion to connect to Exchange Online using remote Windows PowerShell or follow the arctile below:

https://technet.microsoft.com/en-us/library/JJ984289%28v=EXCHG.150%29.aspx?f=255&MSPPError=-2147217396

If it still not work, please run the following command in Exchange 2013 on-premises server EMS to have a try:

Get-Mailbox -Identity blahblahblah -archive

Get-Mailboxstatistics blahblahblah -archive

Regards,

September 1st, 2015 3:49am

Thanks for the link. 

I've tried both:

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

and

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/

-Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

but get the "The user 'blah blah blah' has a cloud-based archive.  Currently, you can't run Get-MailboxStatistics -Archive on a cloud-based archive." when I run

Get-MailboxStatistics blahblahblah -archive

My mailbox is On-Premise and my In-Place Archive is in the cloud.

Thanks for any hints!

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 11:14am

Thanks for the link. 

I've tried both:

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

and

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/

-Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

but get the "The user 'blah blah blah' has a cloud-based archive.  Currently, you can't run Get-MailboxStatistics -Archive on a cloud-based archive." when I run

Get-MailboxStatistics blahblahblah -archive

My mailbox is On-Premise and my In-Place Archive is in the cloud.

Thanks for any hints!

That tells me you are not querying Office 365, but are connecting to an on-prem Exchange server.

HOw exactly are you connecting 365? From an Exchange Server or from a powershell window on your local workstation? I would do this from your local workstation.

September 1st, 2015 11:24am

I was connecting (or trying to) from an Exchange Management Shell on a non-Exchange server.

I tried in PowerShell ISE on my workstation and it works great!  

Thanks so much for the heads up on that one.  It's much appreciated!

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 11:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics