PowerTip: Find Syntax for PowerShell Method

Summary: Use Windows PowerShell to find the syntax for a method.

Hey, Scripting Guy! Question I am trying to figure out how to use a .NET Framework method, but it is not working.
           How can I get a better idea of what to do?

Hey, Scripting Guy! Answer Call the method with no parenthesis or parameters, for example:


Comments (1)

  1. Another trick to the same "Method" is by using GET-MEMBER. Access the Method name from the Object through GET-MEMBER and pipe it to a Format-List (If you don’t FORMAT-List you will only receive a quick summary of the Method’s output)

    For Example

    GET-DATE | GET-Member addyears | FORMAT-LIST


Skip to main content