Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Calling an expression from within a command

$
0
0

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}}


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>