O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

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

Adding help for functions

When you dot-source functions into the current Windows PowerShell console, one problem is introduced. Because you are not required to open the file that contains the function to use it, you may be unaware of everything the file contains within it. In addition to functions, the file could contain variables, aliases, PowerShell drives, or any number of other things. Depending on what you are actually trying to accomplish, this may or may not be an issue. The need sometimes arises, however, to have access to help information about the features provided by the Windows PowerShell script.

Using a here-string object for help

In Windows PowerShell 1.0, you could solve this problem by adding a help parameter to the function ...

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