I have a query that i need to to return from a remote domain in the same forest. Because I am trying to query from on domain to another domain I need to query the object using the DN. The two commands i am trying to get are Get-mailbox and Get-MailboxStatistics. I can't get the below code to work.
Get-MailboxStatistics -Identity "CN=EAdmin73824958,OU=Resource Accounts,OU=CEN,OU=HK,DC=abcmgmt,DC=hk" | Select DisplayName,@{label="Alias";e={(get-mailbox $_).alias}}