for loop in PowerShell

Introduction

In this article you can read about branching and other control structures in PowerShell.

if

$ARCH = 64 $CURRENT_USER = $Env:Username If ($ARCH -eq 64) { $PY_DIR = 'Python312' } Else { $PY_DIR = 'Python312-32' } $APP = '\AppData\Local\Programs\Python\' $PY_PATH = 'C:\Users\' + $CURRENT_USER + $APP + $PY_DIR + '\;' Write-Host $PY_PATH -f Blue

C:\Users\Andrei\AppData\Local\Programs\Python\Python312\;

Article author: Andrei Olegovich