Get-CsUserSession
Use the Get-CsUserSession cmdlet to retrieve user session information within a specified date range within the past 30 days.
Syntax
Get-CsUserSession
-StartTime <DateTimeOffset>
-User <String>
[-EndTime <DateTimeOffset>]
[<CommonParameters>]
Description
Deprecation Notice: We will be retiring this feature and cmdlet from Skype for Business Online beginning 5/30/2020. Instead, we recommend the utilization of MS Graph Call Records API, which is where we will continue to invest our development resources. For more information, see /graph/api/resources/callrecords-api-overview?view=graph-rest-beta.
Use the Get-CsUserSession cmdlet to retrieve session information for users within a specified date range within the past 30 days.
You have to be assigned Skype For Business admin role to run this cmdlet.
Examples
-------------------------- Example 1 --------------------------
Get-CsUserSession -User "Ken.Myer@Contoso.com" -StartTime "02/22/2016 07:30:15 PM"
This example returns user session information for Ken Myer from "02/22/2016 07:30:15 PM" to the current date.
Parameters
-EndTime
Specifies the end date, time and offset of the date range.
Type: | DateTimeOffset |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Online |
-StartTime
Specifies the start date, time and offset of the date range.
Type: | DateTimeOffset |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Online |
-User
Specifies the user whose session data will be retrieved.
The input format is any form of user URI defined in Skype for Business Online.
For instance: -User "Ken.Myer@Contoso.com"
.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Online |
Inputs
None.
Outputs
The Get-CsUserSession cmdlet returns an instance of the Microsoft.Rtc.Management.Hosted.Data.UserSession object.