【发布时间】:2020-05-01 19:38:03
【问题描述】:
我能问一下吗? 我将如何对许多机器进行获取过程 但是,对于运行此特定进程的每台机器,是否会返回真假响应? 但是,这一特定进程仅在作为特定进程运行时才起作用或被激活,而当它关闭时,它不会显示为正在运行或后台进程。
我希望它看起来像
S1 真 $running C1 真 $running C2 假 $notrunning C3 真 $running C4 真正的 $running
进程名为“nominate.exe”,想运行这个远程命令,但想不到 我将如何开始。
【问题讨论】:
-
wmic /node:@"%userprofile%\Desktop\ComputerName.txt" process where "Name='Notepad.exe'" Get Processid /format:csv。获取打开的计算机列表for /f "skip=3 delims=\" %A in ('net view ^| findstr /v /C:"The command completed successfully"') do Echo %A >> "%userprofile%\Desktop\ComputerName.txt"
标签: powershell cmd command-line powershell-cmdlet