Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

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
ExchangeScripting LanguagesPowershell
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.
Avatar of Qlemo
QlemoFlag of Germany image"Batchelor", Developer and EE Topic Advisor
This problem has been solved!
Unlock 1 Answer and 13 Comments.
See Answers