powershell windows path code example
Example: powershell script path
# Powershel 3+
$PSScriptRoot
# Powershell 2-
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
# Powershel 3+
$PSScriptRoot
# Powershell 2-
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition