UserLock Documentation
UserLock Documentation
You are here: Reference > UserLock PowerShell > Cmdlet Help > Reset-UserLockSession

Reset-UserLockSession Cmdlet

Synopsis

Resets session in the UserLock server.

Syntax

Reset-UserLockSession [-UserName] <string[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Reset-UserLockSession [-Name] <string[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Reset-UserLockSession [-ComputerName] <string[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Reset-UserLockSession [-InputObject] <Session[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Description

The Reset-UserLockSession cmdlet resets session(s) in the UserLock server. Caution: PowerShell 3.0 is required.

Parameters

-UserName <string[]>

Specifies the name of the user for which to reset all sessions. You can type multiple user names (separated by commas). If the name includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences. Wildcard characters are permited.

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

-Name <string[]>

Specifies the name of the session (Universal key name, in order to identify it uniquely over all kind of session) to reset. You can type multiple session names (separated by commas). If the name includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences. Wildcard characters are permited.

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

-ComputerName <string[]>

Specifies the name of the computer for which to reset all sessions. You can type multiple computer names (separated by commas). If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences. Wildcard characters are permited.

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

-InputObject <Session[]>

Specifies the session objects that represent sessions to reset. Enter a variable that contains the session objects or a command that gets the session objects, such as a Get-UserLockSession command. You can also pipe the objects to Reset-UserLockSession.

Required true
Position named
Accepts pipeline input true (ByValue)
Accepts wildcard characters false

-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 '.'

-PassThru <SwitchParameter>

Returns the reset session object(s). By default, this cmdlet does not generate any output.

Required false
Position named
Accepts pipeline input false
Accepts wildcard characters false

-Force <SwitchParameter>

Resets session(s) with no confirmation.

Required false
Position named
Accepts pipeline input false
Accepts wildcard characters false

-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command.

Required false
Position named
Accepts pipeline input false
Accepts wildcard characters false

-WhatIf <SwitchParameter>

Describes what would happen if you executed the command without actually executing the command.

Required false
Position named
Accepts pipeline input false
Accepts wildcard characters false

<CommonParameters>

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

Input Type

ISDecisions.UserLockLibrary.Session, ISDecisions.UserLockLibrary.UserSession, ISDecisions.UserLockLibrary.RasSession or ISDecisions.UserLockLibrary.IisSession

Return Type

None or ISDecisions.UserLockLibrary.Session

Notes

You can also refer to Reset-UserLockSession by its alias, "ruls". For more information, see about_Aliases. To use Reset-UserLockSession, you must have the "User sessions" UserLock administrative access right. Reset-UserLockSession prompts to confirm reset by default. To prevent from prompting, use -Force. To use Reset-UserLockSession with ISDecisions.UserLockLibrary.Session objects through the pipeline, you can use the Get-UserLockSession cmdlet.

Examples

Example 1

C:\PS>Reset-UserLockSession -UserName 'Alice', 'Bob' -UserLockServerName MyUlSrv

Resets all sessions of the 'Alice' and 'Bob' user accounts in the 'MyUlSrv' UserLock server.

Example 2

C:\PS>Reset-UserLockSession -ComputerName 'MyWrk01' -UserLockServerName MyUlSrv

Resets all sessions opened on the 'MyWrk01' computer in the 'MyUlSrv' UserLock server.

Example 3

C:\PS>Reset-UserLockSession -Name 'MyWrk01/0', 'MyWrk05/2' -UserLockServerName MyUlSrv

Resets 'MyWrk01/0' and 'MyWrk05/2' sessions in the 'MyUlSrv' UserLock server.

Example 4

C:\PS>$us = guls -UserLockServerName $UserLockServerName | where {$_.SessionCount -gt 0} C:\PS>ruls -InputObject $us -userl $UserLockServerName

Resets all interactive sessions in the 'MyUlSrv' UserLock server.

Related Links

Get-UserLockSession

Get-UserLockInteractiveSession

Get-UserLockRasSession

Get-UserLockIisSession

Close-UserLockSession

Lock-UserLockSession

Send-UserLockPopup

Get-UserLockCommand