Is there a way to get the parameters for a Method MemberType when using Get-Member?
Example:
Get-Process | Get-Member -MemberType Method
What I need from this example is the parameters and parameter types of each member in the list.
The purpose of this is to get the members, parameters, and parameter types of a COM+ object I have to create documentation for. So an example can’t be .net specific.
I will be piping the member and parameter info into a razor template to generate the appropriate html.
Edit:
A better example would be this…
$comObj = New-Object -ComObject COMAdmin.COMAdminCatalog
$comObj | Get-Member -MemberType Method
In this example I need to get the parameter names (if there are any) for each method returned.
Get-Memberis meant more for exploring .NET types than PowerShell Commands. For a simple “view” of a command’s parameters try this:For details on the parameters try this:
If you’re looking for more detail on a .NET type member’s parameters then try this:
As for COM objects, that is likely to be a bit more hit or miss. PowerShell doesn’t always get type metadata for COM objects. BTW I do get parameter info (the parameter types) for the COM object you list in your question:
I’m afraid that is all the info PowerShell will give you in this case.