PoshBytes: 12 Logical Days of Christmas
PoshBytes: 12 Logical Days of Christmas Use PowerShell loops and Unicode-safe logic to generate the 12 Days of Christmas with while learning why CharArray breaks certain elements and how StringInfo fixes it. This post is a companion for the video embedded below. Scroll down to see the code from the video. Logical 12 Days of Christmas (No Emojis Yet) Set ordinal...
PoshBytes: Your .NET Path Toolkit for PowerShell
PoshBytes: Your .NET Path Toolkit for PowerShell A fast paced walkthrough of the most useful System.IO.Path methods in PowerShell with practical demos and humor. Learn how to extract filenames, change extensions, combine paths, and manage temporary files. This post is a companion for the video embedded below. Scroll down to see the code from the video. Getting the File Name Extract...
Saving Christmas with PowerShell: Building a Reusable Matching Algorithm
Saving Christmas with PowerShell: Building a Reusable Matching Algorithm What starts as a simple Secret Santa script quickly turns into a full-blown constraint-based matching engine. In this video, we’ll walk you through the entire creation process. Starting with a simple shuffle, building constraints, adding backtracking, and ending with a polished, reusable matching function you can drop into any project. This...
PoshBytes: Numeric Precision in PowerShell
PoshBytes: Numeric Precision in PowerShell In this PoshBytes short you will see how PowerShell can silently lose precision when big integer math is promoted to double and how using the right numeric types and decimal literals helps keep your results exact. This post is a companion for the video embedded below. Scroll down to see the code from the video. Tiny...
PoshBytes: Mastering Here-Strings in PowerShell
PoshBytes: Mastering Here-Strings in PowerShell Learn PowerShell here-strings the fast way with practical examples. We cover expandable vs literal, JSON without escaping, regex patterns, file generation, inline scripts, and how to stop your text from fighting back. This post is a companion for the video embedded below. Scroll down to see the code from the video. Expandable vs. Literal Here-Strings Setup...
PoshBytes: Json Vs Csv
PoshBytes: Json Vs Csv In this PoshBytes Versus episode, ConvertTo-Csv and ConvertTo-Json go head to head to see which format handles your PowerShell data best. Learn how each manages types, nesting, and readability so you can choose the right tool for your next automation. This post is a companion for the video embedded below. Scroll down to see the code from...
PoshBytes: Encrypting secrets with Protect-CmsMessage (without summoning eldritch IT beings)
PoshBytes: Encrypting secrets with Protect-CmsMessage (without summoning eldritch IT beings) Learn how to secure sensitive data in PowerShell using Protect-CmsMessage and Unprotect-CmsMessage. This PoshBytes episode covers how to encrypt, decrypt, and share secrets safely for real-world automation and configuration scenarios. This post is a companion for the video embedded below. Scroll down to see the code from the video. Create and...
PoshBytes: -replace vs .Replace()
In this episode of PoshBytes, we pit -replace against .Replace() in a battle of brains versus brawn. Regex wizardry versus the blunt hammer of literal text replacement. Learn when to wield the wand and when to swing the mallet in your PowerShell scripts! This post is a companion for the video embedded below. Scroll down to see the code from the...
PoshBytes: Select-Object With Custom Properties (Because Plain Properties Are Boring)
Today on PoshBytes, we are going to look at creating custom properties right in the pipeline with Select-Object. This post is a companion for the video embedded below. Scroll down to see the code from the video. Watch the video on YouTube PoshBytes: Select-Object With Custom Properties (Because Plain Properties Are Boring) PoshBytes: Select-Object With Custom Properties (Because Plain Properties Are...
PoshBytes: Copy, Paste, Automate!
In this episode of PoshBytes, we dive into the often-overlooked magic of PowerShell’s Get-Clipboard and Set-Clipboard cmdlets. This post is a companion for the video embedded below. Scroll down to see the code from the video. Watch the video on YouTube PoshBytes: Copy, Paste, Automate! This post walks through simple, practical clipboard operations in PowerShell. Each example includes a short summary...
