Implicit Remoting Question


i notice when use implicit remoting , pipe commands, don't operate expected. example, following piece of code gives 2 different results depending on whether ran remotely, or on server self.  exchange example:

get-mailboxdatabase | get-mailboxstatistics 

on server, code accurately grab database, , start giving each mailbox's statistics every mailbox on every database.  however, implicit remoting, error, "the specified mailbox '<name of database>' doesn't exist."  can see, trying pass name of database name of mailbox, not same experience when connected directly exchange management shell.

i can simulate proper functionality foreach loop, worried may take longer , curious why functionality different between 2 scenarios.  there need modify in how implicitly remoted?

i have tried scenario both powershell 3.0 , 4.0 client.  exchange server running powershell 3.0.

thanks in advance help.

yes.  objects returned strings , may not pipeline correctly.  normal.

invoke-command  -session $remote -command {get-mailboxdatabase | get-mailboxstatistics }

this should work expected.


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS