My script call many other script and i need know each fullname (for log info).
but the same command doesn't work in Powershell_ISE
My script call many other script and i need know each fullname (for log info).
but the same command doesn't work in Powershell_ISE
This code are avaible in Powershell_ISE and in script.ps1 file
function Get-ScriptFullName () {
if($hostinvocation -ne $null) {
$hostinvocation.MyCommand.path
} else {
$script:MyInvocation.MyCommand.path
}
}