I'm trying to retrieve mailbox move history via a remote session and the results I'm getting are different then what I receive when running the command locally.
The powershell code I'm using is :
$user="<youruser>"
(get-mailbox $user | get-mailboxstatistics -IncludeMoveHistory).movehistory|select CompletionTimestamp,SourceDatabase,TargetDatabase
The code I'm using to set up the remote session is :
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<yourserver>/powershell
Import-PSSession $session -CommandName Get-MailboxStatistics,Get-Mailbox -AllowClobber
When executed locally I get the expected results. Executing remotely does not.
Any idea what I am doing wrong? Thanks for all feedback!