Test Your Code Quality with Pester and PSScriptAnalyzer
When writing PowerShell code it’s easy to make small mistakes. For example, renaming a variable but forgetting one occurrence, or using an unapproved verb in a function name. To combat these errors there is a tool called PSScriptAnalyzer which can do a lot of the code quality checks for you. But in the day and age of collaboration and continuous deployment it’s not good enough anymore to just run this utility separate. In this talk Leo Visser will show you how you can use the testing framework Pester to have these code quality checks be integrated in your tests. Besides the basics the talk will also cover how to exempt some files from some rules and how to manage this.
Run PowerShell with Azure deployment scripts
Have you ever tried to create a schedule with a Bicep Template and received an error because the start date was in the past? Or did you ever run into the issue it would have been nice to add a delay to some parts of your deployment? These problems can be solved with parameters or splitting up your deployment into different steps, but sometimes we want everything to be in one template for easy sharing or usage in bigger deployments. For these scenarios we can use Azure deployment scripts. This allows you to run pieces of code during your deployment. Join me in this talk as I demonstrate how to run PowerShell code during a resource deployment to calculate necessary values and add delays. After this talk a whole new world of options will open up to you when looking at resource deployments in Azure!
More info here