Powershell Log Off Remote Session

前端 未结 11 1238
情话喂你
情话喂你 2020-12-02 13:15

I am trying to formulate a Powershell command to remotely log off a user. We have a terminal server with a very unstable program that sometimes locks sessions. We have to re

11条回答
  •  星月不相逢
    2020-12-02 14:10

    Try the Terminal Services PowerShell Module:

    Get-TSSession -ComputerName comp1 -UserName user1 | Stop-TSSession -Force
    

提交回复
热议问题