How to use an environment variable in powershell command
Use $env:[Variablename]
For example:
$env:Appdata
or
$env:COMPUTERNAME
using your example:
$env:GOPATH
To use this to execute a script use
& "$env:GOPATH\bin\hello"
Use $env:[Variablename]
For example:
$env:Appdata
or
$env:COMPUTERNAME
using your example:
$env:GOPATH
To use this to execute a script use
& "$env:GOPATH\bin\hello"