# Remove-Session

Removes one or more Sitecore user sessions.

## Syntax

Remove-Session -InstanceId \<String\[]>

Remove-Session \[-Instance] \<Session>

## Detailed Description

The Remove-Session command removes user sessions in Sitecore.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

## Parameters

### -InstanceId \<String\[]>

Specifies the Sitecore SessionID.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Instance \<Session>

Specifies the Sitecore user sessions.

| Aliases                     |                |
| --------------------------- | -------------- |
| Required?                   | true           |
| Position?                   | 1              |
| Default Value               |                |
| Accept Pipeline Input?      | true (ByValue) |
| Accept Wildcard Characters? | false          |

## Inputs

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

* Accepts a user session.\* Sitecore.Web.Authentication.DomainAccessGuard.Sessio

## Outputs

The output type is the type of the objects that the cmdlet emits.

* None.

## Notes

Help Author: Adam Najmanowicz, Michael West

## Examples

### EXAMPLE 1

```powershell
PS master:\> Remove-Session -InstanceId tekipna1lk0ccr2z1bdjsua2,wq4bfivfm2tbgkgdccpyzczp
```

### EXAMPLE 2

```powershell
PS master:\> Get-Session -Identity michael | Remove-Session
```

## Related Topics

* <https://github.com/SitecorePowerShell/Console/>
* [Get-Session](/appendix/session/get-session.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sitecorepowershell.com/appendix/session/remove-session.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
