You can use $MyInvocation
which contains some useful information about what is currently executed.
function foo {
'This function is called {0}.' -f $MyInvocation.MyCommand
}
You can use $MyInvocation
which contains some useful information about what is currently executed.
function foo {
'This function is called {0}.' -f $MyInvocation.MyCommand
}