As you probably know, I am the PowerShell problem master behind the challenges from the Iron Scripter site. Solving a PowerShell scripting challenge is a great way to test your skills and expand your knowledge. The final result is merely a means to an end. How you get there and what you had to learn are more valuable. By the way, the challenges on the Iron Scripter site are open-ended and there are problems for all PowerShell skill levels, so I hope you'll give a few them a try.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
This week, I will be presenting a set of mini PowerShell challenges for the Research Triangle PowerShell Users Group. This will be an online meeting on Wednesday, February 3, 2021, at 8:00 PM Eastern. You can register for free at https://www.meetup.com/Research-Triangle-PowerShell-Users-Group/events/274886921/. I hope you can join the fun.
A Practice Challenge
To get you warmed-up, I have a little PowerShell challenge for you. This doesn't require you to write a PowerShell script or function. You should be able to answer the challenge with no more than a few lines of PowerShell that you could run at a console prompt.
Using the about_Splatting help file, what word is used the most frequently? If you can show the top 5 even better. Ideally, your code will treat words like "for," and "for" as the same. For extra points, create a simple custom object that shows the help topic name, the total number of words, "," is not a word, the top word and the top word count. Also, try to skip "the" which is almost always a common word.
If you'd like, feel free to leave a comment with a link to your solution.
Get More
If you want even more challenges, especially if you are relatively new to PowerShell, take a look at The PowerShell Practice Primer.
Here’s my quick solution.
https://gist.github.com/thedavecarroll/3f85a4c5bb2d22f2ce7d44a7e2bddb48
See you Wednesday night!
My attempt at the challenge:
https://gist.github.com/tjgruber/0a2121b4c785b7f844d2d2aed1fbb0d1
Though, I won’t be able to make the meetup, I’m in the CET time zone.
Have fun!
Here’s my take on the challenge: https://gist.github.com/Windos/0da44a5b0a9f4b04a117316a347d15c0
Hi Jeff, will you be recording the meeting? 8pm your time is 1am here in the UK 🙁
Thanks!
As far as I know, meetings are almost always recorded. And I’ll also share the problems online.
Hi Jeff, will you be recording the meeting? 8pm your time is 1am here in the UK
Thanks!
Here’s my solution.
https://github.com/Joshrsg/Powershell/blob/main/Get-FrequentHelpFileWords