Categories
Admin Tools Powershell Remote Access Technology

Killing Processes in Windows Remotely

Sometimes I have a workstation that is not responsive, and I have to find a way remotely to find the issue, kill a process and sometimes reboot the windows computer.

  • Open a remote command prompt to the windows computer
  • Run the command tasklist | more
  • find the process PID id. I like to look for processes that are taking the largest amount of memory, or most open sessions
  • Run the command taskkill /F /PID 5411
  • Note 5411 was just a PID number that was in the task list. the PID (Process Identifier) will be different for you for each process.
  • If the computer still does not respond, sometimes you have to force a reboot. Run: shutdown /r /f r is for restart and f is for force

To open a remote command to a windows computer get online and do some searching, many ways to do that with windows. PSExec and Powershell are common ways to do this.

Categories
Remote Access Technology

Add AD user to remote computer RDP Group

If you admin a Microsoft domain, and users use Remote Desktop to remote into their LAN PC, you have to at times add the users account to the computers local remote desktop group.

Powershell Script

$sb = {
$members = ‘NET\persons.account’
Add-LocalGroupMember -Group ‘Remote Desktop Users’ -Member $members
}
Invoke-Command -ScriptBlock $sb -Computername station60