pushd (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
Alternatively:
$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
Note that $PSScriptRoot is preferable for PowerShell 3.0.
pushd (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
0 comments:
Post a Comment