RSS

exchange server 2003 用powershell 做报表

23 May

大家知道,exchange server 2003 是无法使用powershell进行管理的。但是今天这有一个ps脚本可以做用户登陆情况的报表,不过迂回了一下借用wmi来解决该问题

   1: gwmi Exchange_Logon -namespace root\MicrosoftExchangeV2 -computername Exchangeservername `
   2:  -Credential (get-credential) | where {($_.LoggedONuserAccount -ne "NT AUTHORITY\SYSTEM") `
   3:  -and ($_.Storename -eq "Mailbox Store X")} | sort ClientVersion,LoggedOnUserAccount | `
   4: ft LoggedOnUserAccount,ClientName,ClientVersion -a | out-file userClientVersion.txt
Advertisements
 
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: