powershell command line environment variable code example
Example 1: how to get environment variables in powershell
#Windows Powershell
cd Env:
Get-ChildItem
Example 2: powershell command line variables
write-host "There are a total of $($args.count) arguments"
for ( $i = 0; $i -lt $args.count; $i++ ) {
write-host "Argument $i is $($args[$i])"
}