Thursday, 17 November 2016

powershell PSScriptRoot one folder up

$ParentRootPath = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent # This one will give parent parent path
$RootPath = Split-Path $PSScriptRoot -Parent # This one will give parent path