Summary: Here is Problem 3 in Windows PowerShell Mini-Scripting Games 2014.
Microsoft Scripting Guy, Ed Wilson, is here. Today is the middle of the Windows PowerShell Mini-Scripting Games, so we are ready for Problem 3. Remember: Please do not post any answers to these problems until next week. Please do not spoil the fun for your fellow scripters!
Problem 3 description
One of your teammates wrote a script that runs against a select subgroup of users once a week. This script takes a rather long time to complete (upwards of five minutes in some cases). Therefore, the sign-in appears to hang when it is their turn for processing. Users have done everything (called the Help Desk, rebooted the computers, booted up with the network cable unplugged) until they completed signing in with cached credentials to get around the annoying problem.
Your manager has tasked you with providing some sort of visual feedback to show the progress of the script. He did not task you with improving the script or figuring out another way to accomplish the task. He only wants you to write some code that will provide visual feedback to the users that something is happening, and that their computers are not “locked up.”
Write a proof-of-concept code that will provide progress for counting from 1 to 25. You should display a visual progress indicator, and you should also provide text feedback as to what the script is doing. In this example, the script is counting.
Hint: You should see if there is something that will meet the requirements that is readily available before you hand-code your own solution.
Mini-Scripting Games Week will continue tomorrow when I will unveil Question 4 (PowerTip) and Problem 4.
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy