8.3. Developing and Maintaining Script Libraries

Sooner or later, you will be tasked with creating a bigger and more complex solution that uses PowerShell as its implementation language. Before you know it, you can get in a situation where every piece of code is jammed in a single file and you can no longer find your way around in the code that you wrote yourself. This is an unpleasant situation to be in, and you have to be aware of your options for separating script code across several files to make things more manageable. In addition to being able to quickly navigate to the right spot in the right file, splitting code in several pieces makes it more reusable. It is quite common for a useful function to grow out of its first client code, get ...

Get Pro Windows PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.