-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Summary of the new feature / enhancement
Tools like Process Explorer show you a Tree like view for processes that allow you to visibly see a parent's process
I feel it makes sense to add -Parent and for this to run up the tree of parent processes & return information on all parent processes
We already expose Parent as a CodeProperty on the System.Diagnostics.Process type that we could use when returning a single parent process
We could extend this so that it recursively returns or add a similar Parents Code method that does this - but only if there are multiple parents & be blank if there aren't more than one.
This is doable already today but is messy & requires upfront knowledge of how many layers deep this process is.
(((gps | where {$_.Parent.id -eq $(gps -id $pid).Parent.Id}).parent).parent).parentor simpler
(((gps -id $pid).Parent).parent).parentIncluding this natively to this cmdlet would be a user experience win for any troubleshooting
Proposed technical implementation details (optional)
- Add a parameter Parent for Get-Process
- This should be contained a new Parent ParameterSet that when called will return info for Parent Processes of 1/more Processes but should require
IDorNameorCurrentparameters (if Add -Current Parameter to Get-Process #27028 is added) as not to try and get all parent processes for all processes for performance reasons (unless deemed useful to do so)
Initial implementation should return just like how it is today for multiple processes, returning in sequence of grouping together the parent processes with the one being queried at that time for context reasoning
An ideal implementation would allow for this to be displayed in a tree view like those tools but would be a stretch goal & as such I would expect this to come much later on unless it would be simple to add
Metadata
Metadata
Assignees
Labels
Type
Projects
Status