O'Reilly logo

Pro PowerShell for Database Developers by Bryan Cafferky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 6

image

Extending PowerShell

To load a single function for use in a script, we use the dot-sourcing method discussed previously. However, what if we have many related functions that we want to make available to our script? Do we need to dot source each function individually? Fortunately, the answer is no. PowerShell provides an elegant way to group a set of functions together into a module so they can be loaded in just one statement. We’ve already used this feature in previous examples, and now we’re going to discuss how we can create our own modules. We will also cover how to merge multiple script files into a module by using a manifest. Modules ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required