Get-CsUserSession

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

Syntax

Get-CsUserSession
   [-StartTime <Object>]
   [-User <Object>]
   [-EndTime <Object>]
   [-AsJob]
   [<CommonParameters>]

Description

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\>"}

Examples

-------------------------- Example 1 --------------------------

Get-CsUserSession -User "Ken.Myer@Contoso.com" -StartDate "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.

Optional Parameters

-AsJob

{{Fill AsJob Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-EndTime

PARAMVALUE: DateTimeOffset

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-StartTime

PARAMVALUE: DateTimeOffset

Type:Object
Position:Named
Default value:None
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 Server 2015. For instance: -User "Ken.Myer@Contoso.com".

Type:Object
Position:Named
Default value:None
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.