Get-CsUserSession

 

Topic Last Modified: 2017-02-21

Use the Get-CsUserSession cmdlet to retrieve user session information within a specified date range.

Get-CsUserSession -StartTime <DateTimeOffset> -User <String> [-EndTime <DateTimeOffset>]

This example returns user session information for Ken Myer from "02/22/2016 07:30:15 PM" to the current date.

Get-CsUserSession -User "Ken.Myer@Contoso.com" -StartTime "02/22/2016 07:30:15 PM"

Use the Get-CsUserSession cmdlet to retrieve session information for users within a specified date range.

To return a list of all the Role-Based Access Control (RBAC) roles a cmdlet has been assigned to (including any custom RBAC roles you have created), run the following command:

Get-CsAdminRole | Where-Object {$_.Cmdlets -Match "<DesiredCmdletName>"}

 

Parameter Required Type Description

StartTime

Required

System.DateTimeOffset

PARAMVALUE: DateTimeOffset

User

Required

System.String

Specifies the user whose session data will be retrieved. The input format is any form of user URI defined in Skype for Business Server 2015. For instance: -User "Ken.Myer@Contoso.com".

EndTime

Optional

System.DateTimeOffset

PARAMVALUE: DateTimeOffset

StartTime

Required

System.DateTime

The StartTime parameter specifies the start date and time of the date range based on Universal Coordinated Time (UTC.)

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2015 to specify September 1, 2015. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2015 5:00 PM".

EndTime

Optional

System.DateTime

The EndTime parameter specifies the end date and time of the date range based on Universal Coordinated Time (UTC.)

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2015 to specify September 1, 2015. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2015 5:00 PM".

The Get-CsUserSession cmdlet returns an instance of the Microsoft.Rtc.Management.Hosted.Data.UserSession object.

 
Show: