Get-Session
Returns one or more Sitecore user sessions using the specified criteria.

Syntax

Get-Session [-Identity <AccountIdentity>]
Get-Session -InstanceId <String[]>

Detailed Description

The Get-Session command returns one or more Sitecore user sessions using the specified criteria.
The Identity parameter specifies the Sitecore user to get. You can specify a user by its local name or fully qualified name.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-Identity <AccountIdentity>

Specifies the Sitecore user by providing one of the following values.
1
Local Name
2
Example: admin
3
Fully Qualified Name
4
Example: sitecore\admi
Copied!
Aliases
Text
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-InstanceId <String[]>

Specifies the Sitecore SessionID.
Aliases
Text
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.
  • None.

Outputs

The output type is the type of the objects that the cmdlet emits.
  • Sitecore.Web.Authentication.DomainAccessGuard.Session
    Returns one or more user sessions.

Notes

Help Author: Adam Najmanowicz, Michael West

Examples

EXAMPLE 1

1
PS master:\> Get-Session
2
3
Created LastRequest SessionID UserName
4
------- ----------- --------- --------
5
7/3/2014 3:30:39 PM 7/3/2014 3:44:27 PM tekipna1lk0ccr2z1bdjsua2 sitecore\admin
6
7/3/2014 4:13:55 PM 7/3/2014 4:13:55 PM wq4bfivfm2tbgkgdccpyzczp sitecore\michael
Copied!

EXAMPLE 2

1
PS master:\> Get-Session -Identity admin
2
3
Created LastRequest SessionID UserName
4
------- ----------- --------- --------
5
7/3/2014 3:30:39 PM 7/3/2014 3:44:27 PM tekipna1lk0ccr2z1bdjsua2 sitecore\admin
Copied!

EXAMPLE 3

1
PS master:\> Get-Session -InstanceId tekipna1lk0ccr2z1bdjsua2,wq4bfivfm2tbgkgdccpyzczp
2
3
Created LastRequest SessionID UserName
4
------- ----------- --------- --------
5
7/3/2014 3:30:39 PM 7/3/2014 3:44:27 PM tekipna1lk0ccr2z1bdjsua2 sitecore\admin
Copied!

Related Topics