Hello, my name is HCRitter. Welcome to my Dev Blog

A PowerShell Devblog

Blog Post illustration

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 ...

hcritter avatar
HCRitter
Blog Post illustration

PowerShell-Technique: Randomizing

Published

PowerShell-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...

hcritter avatar
HCRitter
Blog Post illustration

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...

hcritter avatar
HCRitter
Blog Post illustration

PowerShell-Technique: Switching

Published

Enhance 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...

hcritter avatar
HCRitter
Blog Post illustration

Enhancing 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...

hcritter avatar
HCRitter
Blog Post illustration

PowerShell-Technique: Trapping

Published

Enhance 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 ...

hcritter avatar
HCRitter
Blog Post illustration

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...

hcritter avatar
HCRitter
Blog Post illustration

PowerShell-Technique: Splatting

Published

How 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...

hcritter avatar
HCRitter
Blog Post illustration

.NET or not .NET - Where

Published

Dotnet or not Dotnet this is the question we will ask in this post Lets find out if the .NET .Where() method is significantly faster than their equivalent in native PowerShell In this post, we'll compare the performance of native PowerShell methods w...

hcritter avatar
HCRitter
Blog Post illustration

String concatenation performance boosting - is this too much ado about nothing? Concatenating strings is a common operation in programming, but did you know that there are different methods you can use to do it? In this post, we will explore four pop...

hcritter avatar
HCRitter
1 2 3