A PowerShell Nonsense Challenge

It is time for your next PowerShell scripting challenge. If you are new to these challenges, please take a few minutes to browse past challenges. There is no time limit. This is not a contest. If you find a challenge, you are invited to try your hand. Submit links to your solutions in the comments.

Now on to the new PowerShell scripting challenge.

The Chairman realizes that for many people, learning and looking at PowerShell can be confusing. Sometimes, it can feel as if it doesn’t make sense. For this challenge, The Chairman wants you to intentionally not make sense.

Intermediate Level

This exercise is being classified as an Intermediate challenge. The Chairman expects more advanced users to develop more sophisticated code with advanced PowerShell scripting features such as parameter validation and error handling. The challenge consists of 4 discreet goals, which build upon the previous task.

Using PowerShell code:

  • Create a random, nonsense “word” of a user-specified length, such as ‘jhmoz’
  • Create a sentence of nonsense words of a user-specified length. Words should be of varying lengths.
  • Create a paragraph of nonsense sentences, of varying lengths.
  • Create 10 sample document files of varying paragraph length.

Extra Credit

  • Sentences should start with an upper case letter and end in a period.
  • Insert punctuation into your sentences such as commas, exclamation points, and semi-colons.
  • Include letters with diacritical marks such as an ?.
  • Create a command to create a nonsense markdown document.

As with all these challenges, you are invited to share links to your work in the comments.

Xev jdavz!


11 Replies to “A PowerShell Nonsense Challenge”

    • Russell Roefer

      Hey Dave. Love your ReadMe and your code. I’m going to take a few notes on your ReadMe especially to improve the reader’s experience. It is interesting that you chose to go with a letter weight based on a sampling of English. It appears that was enough to give you a general vowel-consonant transition within words. I aimed for a that as well, though I used a slightly different approach. I’ll update my ReadMe to explain this a little more on mine. Nice work!

Comments are closed.