troubleshooting Question

Remote Exchange powershell returns different results

Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland asked on
PowershellExchangeScripting Languages
13 Comments1 Solution589 ViewsLast Modified:
HI All,

When I run the code below on the exchange management shell on the exchange server it gives me the results I am after:

get-mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.TotalItemSize -ge 4GB} |Sort-Object TotalItemSize -Descending |Select-Object DisplayName,TotalItemSize

however when I run this same code remotely, from my laptop it gives me a different result and not the result I am after, how do I resolve this problem?

below is the code I use to connect remotely to exchange:

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ts-mail01.x.com/PowerShell/ -Authentication Kerberos -Credential $UserCredential 

Import-PSSession $Session 

thank you in advance.
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros