Hey I want to check on an remote computer for a process owner of a specific process and kill it when the owner is for example xyz. I already managed it to check for the owner but I don't know how to kill it when the owner is xyz.
What I have so far:
get-wmiobject -computername remotePC win32_process|where{$_.name -eq "firefox.exe"}|select name,@{n="owner";e={$_.getowner().user}}