简体   繁体   English

如何使用 wmi 在不属于管理员组的情况下终止远程进程?

[英]How do I kill a remote process without being on the administrator group using wmi?

What is the least level of privilege required for remotely killing a process on a Windows machine using wmi from c#?使用来自 c# 的 wmi 远程杀死 Windows 机器上的进程所需的最低权限级别是多少?

Currently, I am using an account in the administrators group on the target machine to kill the processes and stop/start windows services but this is causing issues because being in the administrator group also allows users to log on to the target machine via Remote Desktop and I don't want that.目前,我正在使用目标机器上管理员组中的帐户来终止进程并停止/启动 windows 服务,但这会导致问题,因为在管理员组中还允许用户通过远程桌面登录到目标机器和我不想要那个。 What are my options here?我在这里有什么选择?

Can you have a windows group with all the administrator privileges without the Remote Desktop privilege?您能否拥有一个具有所有管理员权限但没有远程桌面权限的 windows 组?

To the first part of your question: to kill a process (whether locally or remotely) you need to either be the owner of the process (ie the account that originally executed it) or an administrator or SYSTEM.对于您问题的第一部分:要终止进程(无论是本地还是远程),您需要成为该进程的所有者(即最初执行它的帐户)或管理员或系统。

As for the last question regarding Remote Desktop privileges, this is controlled by Group Policy and/or Local Security Policy.至于关于远程桌面权限的最后一个问题,这是由组策略和/或本地安全策略控制的。 Look under Computer Configuration\Security Settings\Local Policy\User Rights Assignment for "Allow log on through Remote Desktop Services" , which by default contains the local Administrators and Remote Desktop Users groups.计算机配置\安全设置\本地策略\用户权限分配下查找“允许通过远程桌面服务登录” ,默认情况下包含本地管理员和远程桌面用户组。 (There's also a "Deny log on through Remote Desktop Services" options as well.) (还有一个“拒绝通过远程桌面服务登录”选项。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在没有 WMI 的情况下获取在远程计算机上运行的进程的所有者 - How to get owner of process running on remote machine without WMI "如何在 Windows 中终止当前使用 localhost 上的端口的进程?" - How do I kill the process currently using a port on localhost in Windows? 在使用Python的Windows中,如何杀死进程? - In Windows using Python, how do I kill my process? 如何在Powershell中终止进程 - How do I kill a process in Powershell 如何使用 WMI 通过 Python 获取进程所有者? - How to get Process Owner by Python using WMI? 如何通过名称找到进程并使用ctypes终止? - How can I find a process by name and kill using ctypes? 如何在批处理脚本中使用taskkill杀死子进程? - How can I kill child process using taskkill in a batch script? 当进程不存在时,如何使用 powershell 终止进程而不会出现错误 - How kill a process using powershell without getting errors when the process does not exist Windows 10-WMIC / WMI远程访问被本地管理员拒绝 - Windows 10 - WMIC/WMI Remote Access denied with local administrator 如何从具有管理员权限的进程启动没有管理员权限的新进程? - How to start a new process without administrator privileges from a process with administrator privileges?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM