Is there any other way except $MyInvocation.InvocationName in powershell to get the script name?
As i need to turn my script in an exe and in that case it doesnt work on that exe.
Is there any other way except $MyInvocation.InvocationName in powershell to get the script name?
Share
I’m assuming since you convert the powershell script to an executable that you are after the location of the executable. You can get it this way: