简体   繁体   中英

Exchange cmdlets from c#

I need to run exchange cmdlets from ac# console application.

I followed the guide from http://msdn.microsoft.com/en-us/library/bb332449.aspx for a simple command with a single parameter

The cmdlets I need to run is:

Get-MailboxStatistics -server evs | Select servername, StorageGroupName,databasename,@{expression={$_.TotalItemSize.value.ToKB()}},ItemCount,mailboxguid

I cannot specify the field that I need after the select command and I don't know how I can pass the expression @{expression={$_.TotalItemSize.value.ToKB()}} to cmdlets.

Is there a way to do it in managed code?

您是否尝试过http://msdn.microsoft.com/zh-cn/library/ff326155(v=EXCHG.140).aspx中的Exchange命令行管理程序SDK中的示例?

Take a look at the Redemption library: http://www.dimastr.com/redemption/

I'm not sure if it satisfies your specific requirements but it does expose a lot of information through managed code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM