---
locale: "en"
updated_at: "2025-10-27T19:54:35.938Z"
canonical: "https://www.isdecisions.com/en/userlock/docs/build-with-userlock/powershell/cmdlet-reference/get-userlockiissession"
---

# Get-UserLockIisSession

## Synopsis

Gets the opened IIS sessions registered in UserLock server.

## Syntax

```powershell
Get-UserLockIisSession [-UserName <string[]>] [-UserLockServerName <string>][<CommonParameters>]

Get-UserLockIisSession [-Name] <string[]> [-UserLockServerName <string>][<CommonParameters>]

Get-UserLockIisSession [-ComputerName] <string[]> [-UserLockServerName <string>][<CommonParameters>]
```

## Description

The Get-UserLockIisSession cmdlet gets the opened IIS sessions registered in UserLock server, and searches them by user name (name of the account that opened the session), by computer name (where the session is located) or by name of a session (Universal key name, to uniquely identify it by specifying the type of session). If the cmdlet is used without parameters, all IIS sessions will be returned. Caution: PowerShell 3.0 is required.

## Parameters

#### -UserName <string[]>

Specifies the user name of a session (name of the account that opened the session). You can type multiple user names (separated by commas). Wildcard characters are permitted.

|  |  |
| --- | --- |
| Required | false |
| Position | 1 |
| Accepts pipeline input | true (ByValue, ByPropertyName) |
| Accepts wildcard characters | true |

#### -Name <string[]>

Specifies the name of a session (Universal key name of the session, to uniquely identify it by specifying the type of session). You can type multiple names (separated by commas). Wildcard characters are permitted.

|  |  |
| --- | --- |
| Required | true |
| Position | named |
| Accepts pipeline input | true (ByValue, ByPropertyName) |
| Accepts wildcard characters | true |

#### -ComputerName <string[]>

Specifies the name of the computer where the session is located. You can type multiple computer names (separated by commas). Wildcard characters are permitted.

|  |  |
| --- | --- |
| Required | true |
| Position | named |
| Accepts pipeline input | true (ByValue, ByPropertyName) |
| Accepts wildcard characters | true |

#### -UserLockServerName <string>

Specifies the name of the UserLock server. The default is the localhost name.

|  |  |
| --- | --- |
| Required | false |
| Position | named |
| Accepts pipeline input | false |
| Accepts wildcard characters | false |
| Default Value | '.' |

#### <CommonParameters>

For more information about common parameters, type "Get-Help about_commonparameters".

## Input Type

None

## Return Type

ISDecisions.UserLockLibrary.IisSession or None

## Notes

You can also refer to Get-UserLockIisSession by its alias, "guliis". For more information, see about_Aliases. To use Get-UserLockIisSession, you must have the "User sessions" UserLock administrative access right.

## Examples

#### Example 1

```powershell
Get-UserLockIisSession -UserLockServerName MyUlSrv
```

Gets the IIS sessions registerered in the 'MyUlSrv' UserLock server.

#### Example 2

```powershell
Get-UserLockIisSession Alice -UserLockServerName MyUlSrv
```

Gets the IIS sessions, opened by the user Alice, registered in the 'MyUlSrv' UserLock server.

## Related Links

[Get-UserLockSession](/userlock/docs/build-with-userlock/userlock-powershell/cmdlet-help/get-userlocksession)

[Get-UserLockInteractiveSession](/userlock/docs/build-with-userlock/userlock-powershell/cmdlet-help/get-userlockinteractivesession)

[Get-UserLockRasSession](/userlock/docs/build-with-userlock/userlock-powershell/cmdlet-help/get-userlockrassession)

[Reset-UserLockSession](/userlock/docs/build-with-userlock/userlock-powershell/cmdlet-help/reset-userlocksession)

**[Get-UserLockCommand](/userlock/docs/build-with-userlock/userlock-powershell/cmdlet-help/get-userlockcommand)**
