Hello,
In C:\Users\Powershell folder, I a a script as ZZZ_Test. This script writes script's directory as below:
$MyDirectory = (Split-Path $script:MyInvocation.MyCommand.Path) + "\"
"---> " + $MyDirectory
Generally it doesn't run or run with error as below. But sometimes, it runs succesfully with no error.
Do you know what can be the problem. Is it a library bug or I skip something?