This is the built-in help made by Microsoft for the command 'Invoke-RDUserLogoff', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 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.
Ends a user session and closes all running applications.
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.
Online Version: http://go.microsoft.com/fwlink/?LinkId=294235
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.