Iron Scripter prelude

Iron Scripter 2019 Prelude Challenge #2

To continue preparing you for the upcoming battle, the Chairman has arranged another prelude challenge. If the Chairman is feeling generous, a sample solution may be provided in about a week’s time.


You have been given a function from a previous co-worker that you need to maintain. The code does not work as expected any more. Correct the function according to your faction’s scripting philosophy and create a Pester test file to unit test the code. You do not necessarily have to re-write the function from scratch. This is the code that needs to be corrected and serve as the basis of your Pester unit test.


This function should get disk information from one or more computers. It should accept computer names via a parameter and from the pipeline and should only get a drive C through G. Errors should be logged to a text file with a file name that includes a timestamp value in the form YearMonthDayHourMinute.

For non-North Americans feel free to adjust the date time format in the function and Pester tests.

Correct output should look like this:

sample correct output

Be sure to verify that the logging errors feature works as expected.

Allez de code!

3 thoughts on “Iron Scripter 2019 Prelude Challenge #2”

Comments are closed.