PowerTip: Find PowerShell Cmdlets that Support the PassThru Parameter


Summary: Learn how to find required parameters by using the Windows PowerShell Get-Command cmdlet in Windows PowerShell 3.0.

Hey, Scripting Guy! Question  How can I find cmdlets in Windows PowerShell 3.0 that support the PassThru parameter?

                     Hey, Scripting Guy! Answer Use the ParameterName parameter from the Get-Command cmdlet, as shown here.

                                       Get-Command -ParameterName PassThru

Comments (2)

  1. Vern_Anderson says:

    For the ones that don't there's always Tee-Object =)

  2. Ed Wilson says:

    @Vern_Anderson Hi Vern! Yes, there is always Tee-Object … I love that cmdlet because it really simplifies things. I no longer have to choose if I want console output, or variable output … I can have both. I have written a number of Hey Scripting Guy
    blog articles about using Tee-Object
    social.technet.microsoft.com/…/en-US

Skip to main content