Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    This is the only one it worked for me, trying to feed powershell from STDIN. Commented Apr 15, 2017 at 16:45
  • This solution also works properly when you are in a UNC path context. Commented Feb 12, 2018 at 7:50
  • 4
    This is apparently picking up the working directory - rather than where the script is located ? Commented Nov 9, 2018 at 12:05
  • 2
    @monojohnny Yes this is basically the current working directory and will not work when calling a script from another location. Commented Jan 24, 2019 at 11:26