Invoke-RDUserLogoff

Invoke-RDUserLogoff

Ends a user session and closes all running applications.

구문

Parameter Set: Default
Invoke-RDUserLogoff [-HostServer] <String> [-UnifiedSessionID] <Int32> [-Force] [ <CommonParameters>]

자세한 설명

The Invoke-RDUserLogoff cmdlet ends a user session and closes any running applications.

To end a session without closing applications use the Disconnect-RDUser cmdlet.

To get the ID for the user session that you are ending, use the Get-RDUserSession cmdlet. Because the user session ID is unique only within the context of a session host, a different session within a deploymenthost 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.

매개 변수

-Force

Indicates that the cmdlet ends the user session and closes all running applications without prompting for user confirmation.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-HostServer<String>

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.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-UnifiedSessionID<Int32>

Specifies a unique session ID on the host. Use Get-RDUserSession to retrieve the unique ID for a specific user session.

별칭

없음

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • System.Object

예제

Example 1: End a session connected to an RD Session Host server

This command ends the user session that has the ID 2, which is connected to the host server named rdsh-1.contoso.com.

PS C:\> Invoke-RDUserLogoff -HostServer "rdsh-1.contoso.com" -UnifiedSessionID 2

Example 2: End a session connected to an RD Virtualization Host server

This command ends the user session that has the ID 14, which is connected to the virtualization host server named rdvh-1.contoso.com. Because the command includes the Force parameter, it ends the session without prompting for user confirmation.

PS C:\> Invoke-RDUserLogoff -HostServer "rdvh-1.contoso.com" -UnifiedSessionID 14 -Force

관련 항목

Disconnect-RDUser

Get-RDUserSession

Send-RDUserMessage