Skip to content

Instantly share code, notes, and snippets.

@h3nryza
Created July 17, 2018 17:34
Show Gist options
  • Select an option

  • Save h3nryza/4e0df67c40c27b427fe7e3e99804182d to your computer and use it in GitHub Desktop.

Select an option

Save h3nryza/4e0df67c40c27b427fe7e3e99804182d to your computer and use it in GitHub Desktop.
Powershell script execution directory
#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