Advanced
For the black belt PowerShell scripters …
-
Explore how inheritance can reduce duplication and improve code reuse, while also learning why deep class hierarchies often become a liability. Understand when to use inheritance, when to prefer composition, and how to keep your object model simple and practical.
-
Refactor a traditional server health-check script into a practical PowerShell class. Discover constructors, methods, encapsulation, and object behaviour through a realistic example that demonstrates how classes can turn sprawling scripts into maintainable automation solutions.
-
PowerShell classes are not about making scripts look like C#. They’re about reducing complexity as automation grows. Learn when classes add real value, how they differ from PSCustomObject, and why long-lived automation projects often benefit from a more structured approach.
-
Enums in PowerShell provide a clean way to work with strongly typed values, improving readability, maintainability, and reducing errors. By grouping related constants under a single type, you avoid magic numbers and hardcoded strings, gain autocompletion, and enable built-in validation in functions. Whether you use native syntax, Add-Type with C#, or classes with static properties, enums make your scripts more robust and easier to manage.
-
PowerShell Remoting lets you run commands, gather inventory, and automate fixes across dozens—or hundreds—of systems from one console. In this guide you’ll enable remoting safely, run one‑off commands with Invoke-Command, build persistent sessions for faster workflows, push scripts, move files, and troubleshoot connectivity like a pro. If you manage Windows servers or mixed environments, mastering these patterns will cut tedious RDP hops, standardize execution, and boost reliability—while keeping security (WinRM, auth, firewall, encryption) front and…
-
In this blog post, we explore optimizing parallel execution in PowerShell by reusing threads. By leveraging ConcurrentQueue and ForEach-Object -Parallel, we can significantly improve performance for time-intensive tasks. This method reuses threads instead of creating and removing them each time, resulting in faster execution. We provide a detailed example of pinging IP addresses to demonstrate the efficiency of this approach. Whether you’re new to multi-threading or looking to enhance your scripts, this guide offers valuable…
