Forum Discussion
dreamfancy
Dec 28, 2020Copper Contributor
How can I use Handle.exe with Windows PowerShell
Nobody is helping and I can't solve this problem. I want to remove any that has a handle on Notepad.exe. I know how to run sysinternal handle.exe in this url source. But I am coding a software and I ...
farismalaeb
Dec 30, 2020Iron Contributor
From what I try to understand, you are trying to get the executed command (command id) from a process and perform an action against it, such as a notepad open a file called C:\users\dream, you want to close the notepad.
if so, you can use the WMI Object
Get-WmiObject Win32_Process | select name, commandline