My PowerShell script looks like this:
$counter = 1
function next() {
Write-host "$counter"
$counter++
}
next
next
next
next
What am I doing wrong? I want to see the counter increase.
The output, surprisingly (to me), looks like this:
1
1
1
1