Created
July 17, 2018 17:34
-
-
Save h3nryza/4e0df67c40c27b427fe7e3e99804182d to your computer and use it in GitHub Desktop.
Powershell script execution directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Get Script Execution Directory | |
| [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition) | |
| #OR | |
| $PSScriptRoot | |
| #OR | |
| $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment