切换到宽版
  • 5724阅读
  • 3回复

[求助]导出Exchang报表结果异常!!! [复制链接]

上一主题 下一主题
 
只看楼主 倒序阅读 0楼  发表于: 2014-11-04
通过如下命令导出Exchange 报表,结果异常。
[PS] C:\>
Get-MessageTrackingLog -Start "11/04/2014 00:00:00" -End "11/04/2014 11:20:00" -ResultSize unlimited -EventId s
end | Where-Object {$_.Sender -eq "minzhe@XXX.com"} |Select-Object time,eventid,recipients,recipientstatus
| Export-Csv  -NoTypeInformation  -encoding utf8 d:\minzhe.csv

结果如下:(怎么显示成“System.String[]","System.String[]"?

"Time","EventId","Recipients","RecipientStatus"
"2014/11/4 10:10:50","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:53","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:53","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:54","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:55","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:55","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:55","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:55","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:55","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:56","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:57","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:58","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:58","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:59","SEND","System.String[]","System.String[]"
"2014/11/4 10:10:59","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:00","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:00","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:00","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:01","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:01","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:01","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:02","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:02","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:02","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:02","SEND","System.String[]","System.String[]"
"2014/11/4 10:11:02","SEND","System.String[]","System.String[]"



M
分享到

只看该作者 1楼  发表于: 2014-11-04
这是因为Recipient和RecipientStatus是Object,可能有多值,所以显示成"System.String[]"。

可以尝试下列命令解决该问题:

Get-MessageTrackingLog -Start "11/04/2014 00:00:00" -End "11/04/2014 11:20:00" -ResultSize unlimited -EventId s
end | Where-Object {$_.Sender -eq "minzhe@XXX.com"} |Select-Object time,eventid,@{l="Recipients";e={$_.Recipients -join " "}},@{l="RecipientStatus";e={$_.RecipientStatus -join ","}} | Export-Csv  -NoTypeInformation  -encoding utf8 d:\minzhe.csv
只看该作者 2楼  发表于: 2014-12-22
回 opop 的帖子
opop:这是因为Recipient和RecipientStatus是Object,可能有多值,所以显示成"System.String[]"。
可以尝试下列命令解决该问题:
Get-MessageTrackingLog -Start "11/04/2014 00:00:00" -End "11/04/2014 11:20:00" -ResultSize unlimited -EventId s
. .. (2014-11-04 16:39) 

哦,明白了,那么多个值还可以进一步过滤删选吗?
M

只看该作者 3楼  发表于: 2014-12-22
回 cisco1181788 的帖子
cisco1181788:哦,明白了,那么多个值还可以进一步过滤删选吗?(2014-12-22 11:09)嬀/color]

可以用-Contains参数筛选多值吧
快速回复
限60 字节
 
上一个 下一个