PowerShell Logo Small

Invoke-RDUserLogoff



This is the built-in help made by Microsoft for the command 'Invoke-RDUserLogoff', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Ends a user session and closes all running applications.

SYNTAX


Invoke-RDUserLogoff [-HostServer] <String> [-UnifiedSessionID] <Int32> [-Force] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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.





<

RELATED LINKS

Disconnect-RDUser
Get-RDUserSession
Send-RDUserMessage

REMARKS

<

Examples


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

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



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




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

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



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.