【发布时间】:2018-06-11 20:58:30
【问题描述】:
我正在使用以下查询从 o365 skype for business service 检索指定日期范围内的用户会话信息。
$mbxes = Get-CsOnlineUser | select UserPrincipalName
$startTime = "5/1/2018"
foreach ($mbx in $mbxes) {
Get-CsUserSession -User $mbx -StartTime $startTime
}
运行此查询会为我正在检索的所有邮箱提供以下警告:
WARNING: There is no user session data for the user @{UserPrincipalName=account1@companyX.onmicrosoft.com} within the specified date range 01/05/2018 00:00:00 -07:00 to
11/06/2018 05:22:31 -07:00.
但是当我只是运行这个命令时:
$mbxes = "account1@companyX.onmicrosoft.com"
$startTime = "5/1/2018"
foreach ($mbx in $mbxes) {
Get-CsUserSession -User $mbx -StartTime $startTime
}
我正在获取所有会话数据来响应此邮箱。 我想知道为什么当我用所有邮箱地址创建一个变量时,即使会话数据存在,也没有给我返回数据。
【问题讨论】:
标签: powershell