Application Insights (AI) is the application performance management (APM) and logging platform for Microsoft Azure. They provide a client instrumentation library for several popular platforms/languages– but there isn’t any official module for PowerShell. In this post I share some new functions that demonstrate how to log telemetry data to AI from PowerShell.
Continue readingPowerShell
Tips for writing your first compiled binary PowerShell modules
I recently completed work on a my first compiled binary PowerShell module– these are modules built with C#/.Net code instead of PowerShell code. A few module development basics like project setup, handling help files, and writing unit tests did take some work to figure out. In this article I provide some tips for how to handle these common scenarios to help you get started on new projects.
Continue readingQuick Tip: Windows PowerShell execution policy handling for x64 and x86 processes
Windows PowerShell’s execution policy is well known feature that helps prevent users from accidentally running malicious scripts. I hit an interesting situation recently where Get-ExecutionPolicy showed that I was allowed to run scripts, but in practice I still couldn’t execute scripts from a .NET application’s hosted runspace. What was the problem? The execution policy settings differed across x64 and x86 processes. Since this problem isn’t covered in the official documentation I figured it deserved a quick write-up.
Continue readingPowerShell module starter kit – updated for 2019
A couple years ago I wrote a PowerShell module starter kit (here). The goal was to provide an example for organizing a module using best practices and provide a live repository you could clone and play around with.
I’ve taken that starter kit module and updated it for 2019. Incorporating some new best practices and new usage patterns that I find helpful. Head over to the GitHub link to check it out!
Continue reading