OK, I am a little embarrassed but I gotta ask anyway. I have a perfectly-running script that I wrapped in an infinite loop with a sleep at the end:
while($true){}
That's all I added was this code and all of the curly braces match so why am I getting this error:
"Missing closing statement block in line x, where x is the last line in the file"
function A(){
}
while($true){
[... Do Stuff ...]
Start-Sleep -s 10
}
I remove the encapuslating while{} and all is fine.
Any ideas?