April 2025
-
Need to know which parameters were actually passed to your function? $PSBoundParameters has you covered. It’s a built-in dictionary that only includes parameters explicitly provided by the caller. This makes it perfect for clean logic, dynamic behavior, or smart defaults—no need to check for $null or rely on default values. If a key exists in $PSBoundParameters, you know the user meant to pass it.
-
PowerShell is a powerful and versatile scripting language that is very useful for automating processes. I often look for how others have solved a particular problem. I want to share some, not all — sorry– :), handy tricks that I have collected over time with you here. They are not complete scripts but rather a collection of useful snippets that you can use in your own scripts. Most examples come from the PowerShell community, and…
-
Setting up Visual Studio Code (VSCode) for PowerShell development can be overwhelming due to the numerous available options and extensions. In this guide, I’ll walk you through my personal VSCode setup for PowerShell development, including essential extensions, recommended settings, and layout customizations that enhance productivity. Whether you’re transitioning from PowerShell ISE or starting fresh with VSCode, this guide will help you create an optimized development environment.
-
In this blog post, we explore optimizing parallel execution in PowerShell by reusing threads. By leveraging ConcurrentQueue and ForEach-Object -Parallel, we can significantly improve performance for time-intensive tasks. This method reuses threads instead of creating and removing them each time, resulting in faster execution. We provide a detailed example of pinging IP addresses to demonstrate the efficiency of this approach. Whether you’re new to multi-threading or looking to enhance your scripts, this guide offers valuable…