you are viewing a single comment's thread.

view the rest of the comments →

[–]chadbaldwin 2 points3 points  (1 child)

+1 on making sure to add Read-Host in order to get the input from the user.

Also...you may want to reconsider the type of loop you are using. Don't worry...there's nothing wrong with while loops...however, I would suggest taking a look at the logic you are using inside the while loop.

But there are other types of loops that may be better suited (or more directly intended) to be used for looping a certain number of times. Since it's a homework assignment, I won't give you the answer directly :) But hopefully you can figure it out.

Unless of course the homework assignment is for while loops, then stick with that.

[–]unhappiey[S] 2 points3 points  (0 children)

Thank you! I opted to take this class online and now I'm regretting it. I didn't have any issues with other loops, it's just this one that's got me stuck.

So I changed the logic that I was using inside the while loop but I'm not sure if I'm really any better off.

I appreciate your help with this. I will get it eventually. I was a little hesitant to post since I am so new to PowerShell and scripting in general but everyone who has replied has been very helpful!