ps/Modules/Cole.PowerShell.Developer/Public/Get-GrandParentFunctionName.ps1
2023-05-30 22:51:22 -07:00

13 lines
235 B
PowerShell

function Get-GrandParentFunctionName {
<#
.SYNOPSIS
Get the name of the function that called the one that called us
#>
[CmdletBinding()]
[OutputType([System.String])]
Param()
return (Get-PSCallStack)[2].Command
}