Board logo

标题: [转载代码] Exchange Powershell 查看用户最后登录邮箱时间 [打印本页]

作者: HAT    时间: 2013-7-8 20:23     标题: Exchange Powershell 查看用户最后登录邮箱时间

在Exchange日常管理中,我们可能经常会遇到这样的问题,就是怎么来知道一个用户最后的登录时间?这个问题在使用Exchange powershell就能很好的解决了。
用管理员身份运行Exchange management powershell

查看某一个邮箱数据库的统计信息,输入:
  1. Get-MailboxStatistics -database 'mailboxdatabase'
复制代码
加上参数sort lastlogontime -Descending就能对登录时间进行一个降序排序。
加上sort lastlogontime -Unique的话就是以升序进行排序
下面示例以降序显示:
  1. Get-MailboxStatistics -database 'mailboxdatabase' | sort lastlogontime -Descending
复制代码
查询某台邮箱角色服务器上的用户登录时间:
  1. Get-MailboxStatistics –server 'server'
复制代码
针对某一个用户的查询:
  1. Get-MailboxStatistics 'user'|fl
复制代码
Exchange的Powershell能做出很多很多EMC中无法做到的管理操作,管理上带来非常强大的体验。

TechNet – Exchange Server / TechNet – Exchange Server 2010
http://technet.microsoft.com/zh-cn/library/dn146026.aspx




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2