PowerTip: Find PowerShell Cmdlets that Accept Hash Table Input


Summary: Find Windows PowerShell cmdlets that accept a hash table for input.

Hey, Scripting Guy! Question How can I find what Windows PowerShell cmdlets accept a hash table for input?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet, use the ParameterName parameter, and search for HashTable information:

Get-Command -ParameterName *hashtable* 

Comments (4)

  1. Boe Prox says:

    Ed,

    Did you mean to use -ParameterType instead of -ParameterName to show parameters which accept a hashtable as input?

    Boe

  2. jrv says:

    @DJ

    PS C:scripts> Get-Command -ParameterName *hashtable*

    CommandType     Name                                               ModuleName

    ———–     —-                                               ———-

    Cmdlet          Group-Object                                       Microsoft.PowerShell.Utility

  3. Ed Wilson says:

    @Boe Prox yes that is what I mean (it was a tab completion error) 🙁

  4. DJ says:

    Dont wanna be a booger, but, could u at least fix your blog post regarding -ParameterType instead of -ParameterName.

Skip to main content