Behind the PowerShell Pipeline logo

Behind the PowerShell Pipeline

Subscribe
Archives
June 21, 2022

Collection Function Homework

A few weeks ago, I shared my code utilizing generic collections to encode a text file by reversing each line and the entire file. The point of the exercise was to demonstrate using generic collections. I’m expecting you have more practical applications in mind. At the close of the article, I gave you more homework.

Create a function to “encode” a PowerShell script file in reverse/reverse order, saving it to a new file. The script file you “encode” should define a single function. Next, create a second function to “decode” and save to yet another file. Finally, create a third function that will “decode” the file and create the function in your PowerShell session without creating a file.

How did you do?

Want to read the full issue?
GitHub Bluesky LinkedIn About Jeff
Powered by Buttondown, the easiest way to start and grow your newsletter.