Fun and Games with PowerShell

My daughter has been learning Python which I know nothing about (I’m not a developer). I took a look at one of the programs that she’s been working on and said I don’t know Python, but I can create something better than that in PowerShell.

I hadn’t previously used a “do until” loop in PowerShell so I decided this was as good as an excuse as any to use one since the loop has to run at least once anyway and it gave me a chance to learn something new.

I would like to thank Jason Helmick for the tip on using the .NET Framework instead of COM for the speech as well as Rohn Edwards who originally wrote a version of the code shown below that used COM which I translated into using the .NET Framework as well:



  1. Carl

    Nice and easy to follow for a beginner like me, thanks for posting Mike


    By starting with half of the number you will always get it. So, start with fifty then half of that depending on direction and reduce from there with 1/2 each time

  3. Johnny Think

    Great script, easy to read and understand. Your post inspired me to game a powershell game of my own. Its a russian roulette game. Heres the source code

  4. Rajesh Gohil

    Great !!!
    Nice and easy to understand even for a beginner, thank you so much for great script which is learn with fun.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: