ps/Modules/Cole.PowerShell.Developer/Public/Get-ParentFunctionName.ps1

13 lines
216 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Get-ParentFunctionName {
<#
.SYNOPSIS
Get the name of the function that called this one
#>
[CmdletBinding()]
[OutputType([System.String])]
Param()
return (Get-PSCallStack)[1].Command
}