You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PowerShell远程终止进程报错:feature is not supported in remote machine

Troubleshooting Remote Chrome Process Termination (PSRemoting Disabled)

Let’s work through your issue step by step—since PSRemoting is off and your go-to commands stopped working, we’ll focus on reliable alternatives that don’t require it.

First, Diagnose the Root Causes

Your original Stop-Process pipeline failing with "feature is not supported in remote machine" likely stems from recent PowerShell updates: Stop-Process was never designed for explicit remote use, and older implicit support might have been removed. For the Get-WmiObject issue, the Terminate() method might be silently failing due to permission issues or WMI configuration changes on remote machines.

Solution 1: Use Modern CIM Cmdlets (More Reliable Than WMI)

Replace the deprecated Get-WmiObject with Get-CimInstance and Invoke-CimMethod—this is Microsoft’s recommended modern alternative for remote management without PSRemoting. It also returns clear error codes to debug failures:

# Get Chrome processes and terminate them, with result logging
$chromeProcesses = Get-CimInstance -ComputerName $comp -ClassName Win32_Process -Filter "Name LIKE '%chrome.exe'"
foreach ($proc in $chromeProcesses) {
    $terminationResult = $proc | Invoke-CimMethod -MethodName Terminate
    Write-Host "Process ID $($proc.ProcessId) | Termination Status Code: $($terminationResult.ReturnValue)"
}

What the Return Codes Mean:

  • 0: Success (process terminated)
  • 2: Access denied (your account lacks permissions on the remote machine)
  • 5: Permission denied (similar to 2, often related to UAC restrictions)
  • 8: Unknown failure
  • 9: Path not found

If you see codes 2 or 5, confirm your user account is in the Local Administrators group on the remote machine, and WMI access is allowed for your account.

Solution 2: Use taskkill via PsExec (No WMI Dependencies)

If WMI is acting up, Sysinternals’ PsExec tool lets you run commands remotely without PSRemoting. It relies on SMB (port 445) instead, which is often enabled by default:

# Download PsExec first (from Sysinternals, safe and free)
psexec \\$comp taskkill /f /im chrome.exe
  • /f: Forces termination of stubborn processes (like Chrome’s multi-process instances)
  • /im: Targets processes by image name (chrome.exe)

Critical Checks to Fix "Suddenly Broken" Behavior

Since this worked last week, something changed on your remote machines or network:

  • Firewall Rules: Verify remote machines allow inbound WMI traffic (port 135 + dynamic ports 49152-65535) or SMB (port 445) if using PsExec.
  • WMI Permissions: On remote machines, open wmimgmt.msc, right-click WMI Control (Local) → Properties → Security tab. Ensure your user account has Execute Methods, Enable Account, and Remote Enable permissions for the root\cimv2 namespace.
  • Chrome’s Multi-Process Model: Chrome runs multiple child processes—make sure your command targets all instances (the LIKE '%chrome.exe' filter should catch them, but taskkill /f /im chrome.exe will terminate all at once).

内容的提问来源于stack exchange,提问作者raduuu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:34:50