In the recipe, Working with currently-running processes to measure resource consumption, covered in this chapter, we listed out the processes running in the system. The table did not show us the process owner. In this recipe, we look at working with processes started by a certain owner.
Finding the owner of a process
How to do it...
The Get-Process cmdlet can fetch us this information:
- At the prompt, type the following to get all of the parameters that the Get-Process cmdlet accepts:
PS> Get-Help Get-Process
- We see a parameter, IncludeUserName (the name suggests it is a switch parameter). Get more information on it:
PS> Get-Help Get-Process -Parameter IncludeUserName
- Run the following command:
PS> Get-Process...