Hello
If I have a simple script like so
# test
get-process
$myInvocation.ScriptLineNumber
I would expect the lat line of output to return 3 (as on line 3). However it returns 1 not matter where a script I put this command e.g. line 1021 still returns 1
for various reasons I would like to output the line number at a number of points therefore thought the above would do the trick.
Andy advice please how the achieve this and why does the above not work
Thanks All
AAnotherUser__