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

A PowerShell Devblog

Blog Post illustration

In a recent scripting endeavor, I developed a PowerShell script with an ArgumentTransformationAttribute. The script's purpose was to convert PSCustomObjects or Hashtables into a JSON format tailored for seamless integration with a BatchRequest destin...

hcritter avatar
HCRitter
Blog Post illustration

Recently, I participated in AdventOfCode 2023 and encountered challenges that required finding the precise location of a character in a string, along with all its occurrences. Take, for instance, the string 'Hello, world!'. I needed to identify all p...

hcritter avatar
HCRitter
Blog Post illustration

In the rapidly evolving landscape of Entra ID, the use of App-Registrations has become increasingly prevalent, empowering users to seamlessly leverage PowerShell and the Microsoft Graph API for fundamental tasks in Exchange-Online, Entra ID, Intune, ...

hcritter avatar
HCRitter
Blog Post illustration

Introduction: Efficiency is key when working with PowerShell, and maximizing performance is a common goal for script developers. In this post, we'll explore various techniques for retrieving the maximum number from arrays of different sizes, comparin...

hcritter avatar
HCRitter
Blog Post illustration

In the realm of PowerShell, determining the version of the operating system is a common task for sysadmins. However, when it comes to reporting, extracting additional details, such as the Update Build Release (UBR), becomes crucial. While the Winver ...

hcritter avatar
HCRitter
Blog Post illustration

Enhancing PowerShell with GetValueOrDefault: A Neat Solution for Streamlined Hashtables Have you ever wondered why the Hashtable in .NET lacks a GetValueOrDefault method, a feature readily available in basic Dictionaries? In my quest to streamline my...

hcritter avatar
HCRitter
Blog Post illustration

PowerShell-Technique: Smart Aliases

Published

PowerShell-Technique: Smart Aliases Utilizing Non-existent Functions in PowerShell Introduction In a recent project of mine, PSMermaid, I had the privilege of exploring a fascinating technique called 'Smart Aliases,' which was introduced to me by the...

hcritter avatar
HCRitter
Blog Post illustration

Simplifying Creation of Empty PowerShell PSCustomObjects using Custom Functions Creating an empty PSCustomObject in PowerShell is a common task, but the traditional approach can be verbose and repetitive. In this blog post, I'll walk you through a mo...

hcritter avatar
HCRitter
Blog Post illustration

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

hcritter avatar
HCRitter
Blog Post illustration

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

hcritter avatar
HCRitter
« 1 2 3