使用PowerShell获取用户Live @ edu上的用户LastLogonTime
我正在尝试使用LastLogonTime在Live @ edu环境中获取所有用户的csv文件,但是我在这里遇到了一些问题是我的脚本: foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-MailboxStatistics -LastLogonTime $i.DistinguishedName | where {$_.LastLogonTime} | select-object MailboxOwnerID,Name,LastLogonTime | export-csv -path "c:\filepath\UserLastLogon.csv" } 我得到的错误: A positional paparameter cannot be found that accepts argument '[email protected],OU=domain.edu,OU=Microsoft Exchange Hosted Organizations,DC=prod,DC=exchangelabs,DC=com'. +类别信息:InvalidArgument:(:) [Get-MailboxStatistics],ParameterBindingException + FullyQualifiedErrorId:PositionalParameterNotFound,Get-MailboxStatistics 任何帮助将是伟大的!