Variabled $PSScriptRoot and $PSCommandPath are empty in all scripts that were converted to EXE. Please provide alternatives to get these values. $invocation.MyCommand.Path does not work either.
Variabled $PSScriptRoot and $PSCommandPath are empty in all scripts that were converted to EXE.
Please provide alternatives to get these values.
$invocation.MyCommand.Path does not work either.