将邮箱信息保存到一个文本文件中

保存基本邮箱信息,包括显示名称、 存储、 存储组和邮箱大小,到一个逗号分隔文件。
PowerShell
# Name: list-exchange-mailbox.ps1
# Author: Steven Peck
# Date: 06/15/2007
# Description: Exchange 2003 output to file –
# Display Name, Store, Storage group, MB Size, and Date Absent in DS
#

# Get date for file name
$day = Get-Date -UFormat “%Y%m%d”

# Gets data through WMI from specified Exchange mailbox servers $computers = “server001″,”server002″
foreach ($computer in $computers) {
Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer $computer |
sort-object -desc MailboxDisplayName |
select-object MailboxDisplayName,StorageGroupName,StoreName,Size,DateDiscoveredAbsentInDS |
Export-Csv -Path $computer-$day.csv
}

Latest posts by Exchange中文站 (see all)
发布于: 浏览:1841 次

还没有评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据