Skip to content

Get-Process $pid should suggest using -Id $pid #2722

@lzybkr

Description

@lzybkr

The default parameter set for Get-Process accepts -Name by position.

Maybe it's just me, but I forget this all the time, and expect Get-Process 1234 to work.

I think we can make it work in a reasonable way too. If Name is a positive integer and we do not find a process by that name, search again assuming it was a ProcessId.

Edit: instead of making this work (which might not be a good idea always) - I like the suggestion from @rkeithhill to give a better error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestPotential candidate to participate in HacktoberfestIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifIssue-Enhancementthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions