Search notes:
System.Management.Automation.FunctionInfo (class)
A
System.Management.Automation.FunctionInfo
object provides information about a
PowerShell function
In Windows/PowerShell, an instance of a
System.Management.Automation.FunctionInfo
is returned by the
get-command
cmdLet when applied on a function:
PS C:\> (get-command mkdir).GetType().FullName
Alternatively, such a class can also be obtained with get-item function:functionName
:
PS C:\> function f() {}
PS C:\> $info = get-item function:f
PS C:\> $info.GetType().FullName
System.Management.Automation.FunctionInfo
CmdletBinding property
function normal-function {
param()
42
}
function advanced-function {
[CmdLetBinding()]
param()
'Hello World'
}
(get-command normal-function).CmdletBinding
#
# False
(get-command advanced-function).CmdletBinding
#
# True