Author Posts

May 13, 2018 at 10:21 pm

Hi,

If I am trying:

Get-Process -c $comp -name chro* | Stop-Process
I have the following error:

"feature is not supported in remote machine"

If I use the command Get-Service with pipeline for services it's working. Last week I was able to stop a process with this command, but now I have this error for all the computers.

I tried also with Get-WmiObject -Class Win32_Process:

(Gwmi Win32_Process -c $comp | ? {$_.ProcessName -like "*chr*"}).Terminate()
but it's not working, and I don't have errors.

I cannot use Invoke-Command because PSremoting is disabled.

May 14, 2018 at 2:55 am

Can you run this locally on your machine? Can you log into that remote machine and do it there?

May 14, 2018 at 10:30 am

@alex Yes, loccaly get-process chr* | stop-process it's working on both machine.
I will try with WMI class locally also to check.
I need this command for some scripts, and i don't want to use psexec to much. PSRemoting is disable.

May 14, 2018 at 3:21 pm

Try Below

$Process = ""

$Killme = Get-WmiObject win32_Process -ComputerName ACHRCNB0900X409 -Filter "name='$Process'"

IF(!($process -eq "")){

    $Killme.terminate()

}

May 15, 2018 at 11:13 pm

@matt i tried, but it's not working. The process is still running.