powershell set path code example
Example 1: powershell script path
# Powershel 3+
$PSScriptRoot
# Powershell 2-
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
Example 2: powershell add to env path
$env:Path = "SomeRandomPath"; (replaces existing path)
$env:Path += ";SomeRandomPath" (appends to existing path)
Example 3: view to path powershell
$Env:Path -split ';'