<t>In order run a script in the same directory.<br/>
<br/>
In PowerShell 3.0 and later you can use the automatic variable $PSScriptRoot:<br/>
<br/>
$PSScriptRoot/myScript1.ps1<br/>
<br/>
```<br/>
<br/>
In **PowerShell 1.0 and 2.0** you should use this specific property:<br/>
<br/>
```<br/>
& "$(Split-Path $MyInvocation.MyCommand.Path)/myScript1.ps1"<br/>
<br/>
```<br/>
<br/>
The reason you should use that and not anything else can be illustrated with this example script.<br/>
<br/>
```<br/>
## ScriptTest.ps1<br/>
Write-Host "InvocationName:" $MyInvocation.InvocationName<br/>
Write-Host "Path:" $MyInvocation.MyCommand.Path<br/>
<br/>
```<br/>
<br/>
Here are some results.<br/>
<br/>
PS C:\Users\JasonAr> .\ScriptTest.ps1<br/>
InvocationName: .\ScriptTest.ps1<br/>
Path: C:\Users\JasonAr\ScriptTest.ps1<br/>
<br/>
PS C:\Users\JasonAr> . .\ScriptTest.ps1<br/>
InvocationName: .<br/>
Path: C:\Users\JasonAr\ScriptTest.ps1<br/>
<br/>
PS C:\Users\JasonAr> & ".\ScriptTest.ps1"<br/>
InvocationName: &<br/>
Path: C:\Users\JasonAr\ScriptTest.ps1<br/>
<br/>
In **PowerShell 3.0** and later you can use the automatic variable `$PSScriptRoot`:<br/>
<br/>
```<br/>
## ScriptTest.ps1<br/>
Write-Host "Script:" $PSCommandPath<br/>
Write-Host "Path:" $PSScriptRoot<br/>
<br/>
```<br/>
<br/>
PS C:\Users\jarcher> .\ScriptTest.ps1<br/>
Script: C:\Users\jarcher\ScriptTest.ps1<br/>
Path: C:\Users\jarcher</t>