Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 363 Bytes

script-root.md

File metadata and controls

3 lines (2 loc) · 363 Bytes

How do I determine the location of the current PowerShell script?

Ever since PowerShell 3, there is an automatic variable $PSScriptRoot which is set to the path of the directory that contains the currently-executing module or script. Additionally, there is $PSCommandPath which contains the path (including the file name) to the currently executing script.