Christian Ritter

@hcritter

473 Points 2 Followers

26 Posts

0 Answers

Personal blog of Christian Ritter He/Him | Father of two ♥️♥️ | Microsoft MVP |#PowerShell aficionado | Automation enthusiast | Blog author | Founder of PSUGFFM | Public Speaker | Opinions are my own.

Christian Ritter · 4 weeks ago

Automating Sign-In Analysis with PowerShell and Microsoft Graph

Introduction In this article, we'll walk through how to explore and analyze Conditional Access data in Microsoft Entra using the Developer Tools in your browser. The purpose of this walkthro...

Christian Ritter · 3 months ago

PowerShell: Passing External Data into Register-ScriptFeedbackProvider

In my latest module, PSTerminalBoom, I encountered a challenge: how to pass external data into the Register-ScriptFeedbackProvider script block. Unfortunately, $using: didn't work in this co...

Christian Ritter · 9 months ago

Simplifying PowerShell Object Validation & Transforming: A JSON-Schema Refactoring Journey

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

Christian Ritter · 11 months ago

PowerShell-Technique: PowerShell: Getting all String occurrence Indices

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

Christian Ritter · 11 months ago

PowerShell: Securing App-Registration with Application Access Policy

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

Christian Ritter · 11 months ago

PowerShell Perfomance-Test: Get the Maximum

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

Christian Ritter · 11 months ago

PowerShell: Retreive the Update Build Release (UBR)

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

Christian Ritter · 1 year ago

PowerShell: Add GetValueOrDefault Method to a Hashtable

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

Christian Ritter · 1 year ago

PowerShell-Technique: Smart Aliases

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

Christian Ritter · 1 year ago

PowerShell: Creating an "empty" PSCustomObject

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

Christian Ritter · 1 year ago

PowerShell Performance-Test: Like and Equals string comparison methods.

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

Christian Ritter · 1 year ago

PowerShell-Script Showcase: Get-WifiPassword

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

Christian Ritter · 1 year ago

Book-Review: Practical Automation with PowerShell

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

Christian Ritter · 1 year ago

PowerShell-Technique: Randomizing

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

Christian Ritter · 1 year ago

PowerShell Performance-Test: File Reading

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

Christian Ritter · 1 year ago

PowerShell-Technique: Switching

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

Christian Ritter · 1 year ago

PowerShell-Technique: Update-TypeData

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

Christian Ritter · 1 year ago

PowerShell-Technique: Trapping

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

Christian Ritter · 1 year ago

PowerShell-Technique: $PSDefaultParameterValues

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

Christian Ritter · 1 year ago

PowerShell-Technique: Splatting

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

Christian Ritter · 1 year ago

.NET or not .NET - Where

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

Christian Ritter · 1 year ago

String concatenation performance boosting

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

Christian Ritter · 1 year ago

.NET or not .NET - ForEach

.NET or not .NET this is the question, we will ask in this post Lets find out if the .NET .ForEach() method is significantly faster than their equivalent in native PowerShell The most of us...

Christian Ritter · 1 year ago

Padding and Parameters

Today I would like to show you special interest topic: Padding and Parameters This post won't cover all off the aspects of parameters in PowerShell or neither everything you can do with the...

Christian Ritter · 1 year ago

3 ways to sort a list unique

Today I would like to show you a performance table comparing different ways to sort a list/array unique. Sometimes it is necessary to sort a list or an array unique to get rid of duplicates...

Christian Ritter · 1 year ago

[Microsoft.Win32.Registry] VS Set-ItemProperty

Today I would like to show you a performance table comparing different ways to write to the registry. Writing to the registry is more or less a standard task while working as an administrato...
1

Loading More Content