PowerTip: Find Cmdlets that Work with JSON or REST

Doctor Scripto

Summary: Find Windows PowerShell cmdlets that work with JSON or REST.

Hey, Scripting Guy! Question How can you use a single cmdlet to look for cmdlets that work with either JSON or REST?

Hey, Scripting Guy! Answer The Get-Command cmdlet accepts an array—even an array of wildcard characters.
          Configure an array of wildcards to represent either JSON cmdlets or REST method cmdlets:

PS C:\> gcm -Noun *json*, *rest*m*


CommandType     Name                                               ModuleName

———–     —-                                               ———-

Cmdlet          ConvertFrom-Json                                   Microsoft.Powe…

Cmdlet          ConvertTo-Json                                     Microsoft.Powe…

Cmdlet          Invoke-RestMethod                                  Microsoft.Powe…



Discussion is closed.

Feedback usabilla icon