I'm not sure what the issue is, but I'm trying out a super basic for loop in PowerShell and I keep getting errors. Here is my loop:
for ($x = 1: $x -le 5: $x++) {
Write-Host $x
}
I get the error message: 1: : The term '1:' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Can I not use 1? Whats the issue?
:->;orfunction 1: {"1`n2`n3`n4`n5"}