Edit

Share via


Lock-WmsSession

Locks a session for a user.

Syntax

LockById

Lock-WmsSession
    [-SessionId] <UInt32[]>
    [-Message] <String>
    [-Server <String>]
    [<CommonParameters>]

LockAll

Lock-WmsSession
    [-Message] <String>
    [-All]
    [-Server <String>]
    [<CommonParameters>]

Description

The Lock-WmsSession cmdlet blocks desktop use for a specific user. You can specify a message to display on the user's screen.

Examples

Example 1: Lock a session

PS C:\> Lock-WmsSession -SessionId 3 -Message "Your station is locked"

This command locks the specified session and displays the message "Your station is locked" to the user.

Parameters

-All

Indicates that this operation applies to all sessions on the target host.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LockAll
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Message

Specifies the message to display.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Server

Specifies the fully qualified host name of the MultiPoint Server that is the target of the command. The default is localhost.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ComputerName

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SessionId

Specifies an array of session IDs.

Parameter properties

Type:

UInt32[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LockById
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

UInt32

String

Outputs

Object