Skip to content

Enhancement Request: Get-Verb -Group parameter #2527

Closed

Description

@bcdady

The Get-Verb cmdlet should include a -Group Parameter, or another means of filtering the list of approved verbs.

Steps to reproduce

Per Windows PowerShell 5.0 documentation, Get-Verb Syntax is:
Get-Verb [[-Verb] <string[]>] [<CommonParameters>]

Expected behavior

Get-Verb -Group <Common|Communications|Data|Diagnostic|Lifecycle|Other|Security>
Specifying a -Group Parameter would filter to show only the approved verbs in that Group.
Alternatively, Get-Verb could support a -Filter, or -Include and -Exclude parameter(s)

Actual behavior

Get-Verb enumerates the full list of approved verbs and their corresponding verb group, but does not provide a convenient way to filter and more easily view approved verbs

Environment data

Symptom appears consistent from PSVersions 3.0 - 5.0

Activity

  1. iSazonov commented on Oct 24, 2016

    @iSazonov
    Collaborator

    Bryan Dady (@bcdady) Thanks for the enhancement request.
    Today (get-verb).count return 98. Do you really think that this short list should be filtered? Could you give practical examples?
    I believe that this list is very short and stable. And that I would really expect from this cmdlet, this is a description of the verbs and groups.

  2. jpsnover commented on Oct 24, 2016

    @jpsnover
    Contributor

    I like it!

  3. kilasuit commented on Oct 24, 2016

    @kilasuit
    Collaborator

    Not sure there is much need for this as its simple enough to just pipe to Where-Object in my opinion.

  4. added
    Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
    WG-Cmdletsgeneral cmdlet issues
    Issue-Enhancementthe issue is more of a feature request than a bug
    on Oct 25, 2016
  5. bcdady commented on Oct 26, 2016

    @bcdady
    Author

    Ryan Yates (@kilasuit) Yes, except that with | where {}, the admin / IT Pro needs to first know that Verbs are grouped, the names of the Groups they want to view verbs from. Strictly speaking, they could first invoke get-verb | select Group -Unique, and then try each of those Group names through | where {$_.Group -eq $group } | Out-Host -Paging. But why not make all that easier (especially newbies learning the ropes, not yet familiar with approved verbs. If the same results were possible via a parameter of the cmdlet, then an IT Pro can more simply tab through the available Groups, select the best option for their use case, and enumerate the list approved Verbs in that Group.

  6. iSazonov commented on Oct 26, 2016

    @iSazonov
    Collaborator

    I do think that there isn't a cmdlet that is used less frequently:
    Get-Verb

  7. bcdady commented on Oct 26, 2016

    @bcdady
    Author

    Ilya (@iSazonov) Perhaps after we make it more useful, it will be used more frequently.

  8. iSazonov commented on Oct 26, 2016

    @iSazonov
    Collaborator

    Give up! 😊

    What do you say to add a brief description?

    PS > Get-Verb
    
    Verb        Group      Description
    ----        -----      -----------
    Add         Common     <Add description>
    Clear       Common     <Clear description>
  9. lzybkr commented on Oct 26, 2016

    @lzybkr
    Contributor

    There is little point in speculating on the usage.

    I don't really see any downside to this proposal, it is a simple change to add and I can't see the any potential UX problems in the future, e.g. the cmdlet ending up with too many parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.Up-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