When using PowerShell, many users often rely on the like comparison in a where statement for querying data. However, there is an alternative method that can be faster, especially when searching for strings that start with specific letters. This metho...
Christian Ritter
PowerShell is a powerful scripting language that can be used to automate a variety of tasks. In this blog post, we will explore my Get-WifiPassword script that retrieves stored Wifi passwords on Windows machines. The script overcomes the issue of loc...
Christian Ritter
Lately I had the chance to get a copy of the book: "Practical Automation with PowerShell". This is not a paid review just my honest thoughts about it, because after reading I am still impressed. If you're looking to dive into the world of ...
Christian Ritter
PowerShell-Technique: Randomizing
PublishedPowerShell-Technique: Randomizing PowerShell is a powerful tool for automating tasks and managing systems, and one of its useful features is its ability to generate random values. In this post, we'll take a closer look at the Get-Random cmdlet and ex...
Christian Ritter
PowerShell Performance-Test: File Reading - Which method reads a file the fastest? There are several methods and ways to read the content of a file in PowerShell, with the most commonly used being Get-Content. I have to point out that all of the test...
Christian Ritter
PowerShell-Technique: Switching
PublishedEnhance Your PowerShell Scripting with Switch Statements Have you ever found yourself writing a lot of if/elseif/else statements in your PowerShell script? You may have heard of the switch statement as an alternative, but do you know all of its capab...
Christian Ritter
PowerShell-Technique: Update-TypeData
PublishedEnhancing PowerShell objects with Update-TypeData Sometimes the objects that PowerShell cmdlets return don't have all the properties and methods that you need. Fortunately, PowerShell provides a way to extend these objects using a feature called exte...
Christian Ritter
PowerShell-Technique: Trapping
PublishedEnhance Your PowerShell Scripting with Trapping This blog post explains how to use the trap statement in PowerShell to improve error handling, reduce code size, and make scripts more organized and readable. PowerShell's $trap statement is one of the ...
Christian Ritter
Enhance Your PowerShell Scripting with Default Parameter Values In this post, we'll take a closer look at the benefits of using default parameter values in PowerShell. As we previously explored in our discussion of splatting, setting default values f...
Christian Ritter
PowerShell-Technique: Splatting
PublishedHow Splatting in PowerShell Can Improve Your Code's Aesthetics and Reduce Volume Have you ever found yourself struggling with long, unwieldy PowerShell commands? You're not alone. Backticking can be a tempting solution, but it can also make your code...