4 ms·
I don't have access to powershell on linux but I think the syntax would be (ls).Count (where ls is an alias for http://ss64.com/ps/get-childitem.html http://s
by rat87 12y ago
I don't have access to powershell on linux but I think the syntax would be
(ls).Count
(where ls is an alias for http://ss64.com/ps/get-childitem.html http://ss64.com/ps/get-childitem.html which returns .net FileInfo objects, it can also return info for registry paths)
and
ps | ?{ $_.Name -eq 'tobekilled' } | %{ $_.Kill() }
(ps an alias for http://ss64.com/ps/get-process.html http://ss64.com/ps/get-process.html returns .net Process objects)
or the equivalent of pkill
Stop-Process -Name 'tobekilled'