Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 2.96 KB

File metadata and controls

108 lines (78 loc) · 2.96 KB
external help file Module Name ms.date online version schema title
RemoteDesktop.psm1-help.xml
RDMgmt
10/29/2017
2.0.0
Disconnect-RDUser

Disconnect-RDUser

SYNOPSIS

Disconnects a user from a session that runs on a remote server.

SYNTAX

Disconnect-RDUser [-HostServer] <String> [-UnifiedSessionID] <Int32> [-Force] [<CommonParameters>]

DESCRIPTION

The Disconnect-RDUser cmdlet disconnects a specified user from a session that runs on the remote server. All applications continue to run.

Use the Invoke-RDUserLogoff cmdlet to end a session and close running applications.

Use the Get-RDUserSessioncmdlet to retrieve the value for the user session ID. Because the user session ID is unique only within the context of a session host, a different session host server can share the same user session ID. The host server and session ID that you specify in this cmdlet uniquely identify a session within a deployment.

EXAMPLES

Example 1: Disconnect a User from a session on an RD Session Host Server

PS C:\> Disconnect-RDUser -HostServer sessionhost.contoso.com -UnifiedSessionID 2

This command disconnects the user connected to session 2 on the host server sessionhost.contoso.com.

PARAMETERS

-Force

Disconnects the user from a session on the remote server without prompting the user for confirmation.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostServer

Specifies the name of the server that hosts the session. For session collections the server name is the name of the Remote Desktop Session Host (RD Session Host) server. For virtual desktop collections the server name is the name of the Remote Desktop Virtualization Host (RD Virtualization Host) server.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UnifiedSessionID

Provides the unique ID for the session. Use the Get-RDUserSession cmdlet to retrieve the user session ID.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

System.Object

NOTES

RELATED LINKS

Get-RDUserSession

Invoke-RDUserLogoff

Send-RDUserMessage