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