Adding Value to Your PowerShell Functions w/ Jeffery Hicks

1 min read
Share:

PowerShell Ohio User Group With a little education and experience, it is not especially difficult to write a PowerShell function. You might write a function to simplify a basic task for yourself or for others. A function’s purpose is to abstract the user’s experience in running PowerShell code. Your function most likely includes parameters to make the code flexible and reusable. However, there are a few other features you can incorporate into your PowerShell function that will add value from the user’s perspective. These features will improve the quality of your code and add a degree of professionalism.

In this session, we’ll look at three easy-to-use features that are often overlooked but make excellent additions to any codebase. You will learn how easy it is to add verbose messaging to your function. This can serve not only the user but also the function’s author. Next, instead of using Write-Host lines to provide feedback on long-running code, you should take advantage of Write-Progress. Finally, learning to leverage the information stream allows your function to do even more. This will be a demo-heavy session that will help you level up your PowerShell scripting game.