The Lowercase w

Post info:

Handy PowerShell command to stop Task Manager Process!

Have you ever needed to stop multiple processes at once?  I use a product by Devolutions called Remote Desktop Manager.  If you’re a regular reader of this blog, you probably already know that.  When I launch the VMware vCenter Web Client via RDM, I do so via Chrome and it opens the Client Integrated Plugin.  The problem is, when I CLOSE the web client in RDM, it DOESN’T close the “vmware-csd” process.  Once 10 of these processes are opened, it won’t launch any more.  This means, when I go to launch the web client, the check box to login with Windows Session Authentication stays grey and doesn’t activate for use.

I then have to open Task Manager, go and close each the “vmware-csd” processes, one at a time…

In the past, when I got to the point of having to do this more than once, I’d go and download the PSTOOLS and use pskill to kill the process.  But I decided to look into doing this via Powershell instead.  It was so easy!  You’ll need two PowerShell cmdlets for this.  Get-Process and Stop-Process.

First, you’ll want to use get-process to get a list of the running processes.  If you’re a Chrome user, like me…  You’re going to sigh when you see all the Chrome processes. I know I did!  🙂

Once you find the processes you want to stop, run Get-Process again, but this time, with a pipe and where statement.


Get-Process | Where {$_.Name -match "csd"}

er

You can see here, that the process is running 9 times.  This means, I’m going to have a problem soon.

Next, we need to stop the processes.  Unless you know the PID, you can’t run Stop-Process by itself.  So what I did was run my Get-Process statement (above), with a pipe and Stop-Process at the end.


Get-Process | Where {$_.Name -match "csd"} | Stop-Process

The command doesn’t return any syntax. But if you look again, there will be NO “vmware-csd” processes.

I hope someone finds this as handy as I did. 🙂

Ben Liebowitz, VCP, vExpert
NJ VMUG Leader

Leave a Reply

Your email address will not be published. Required fields are marked *