Search notes:

System.Management.Automation.CommandInfo (class)

A System.Management.Automation.CommandInfo object provides information about a PowerShell command. In PowerShell, an instance or an array of instances of CommandInfo can be obtained with the get-command cmdLet.
After obtaining a CommandInfo object, it can be passed to the constructor of System.Management.Automation.CommandMetadata which creates another object that then can be used to query meta information about a command.
This technique is rudimentarily covered here.

See also

$myInvocation.myCommand stores a CommandInfo object.

Index