Ask me anything about your lessons or your code.
“What is a port?” · “Why is my code erroring?”
PowerShell is both a command shell and a scripting language, and its defining trait is that it passes whole objects down the pipeline instead of plain text.
What PowerShell Is and Why It Matters
PowerShell is both a command shell and a scripting language, and its defining trait is that it passes whole objects down the pipeline instead of plain text.
Cmdlets, Parameters, and Getting Help
A cmdlet by itself is rarely enough; parameters tell it what to act on, and Get-Command and Get-Help make the whole cmdlet library explorable without leaving the shell.
Variables and Types
A PowerShell variable always starts with a dollar sign and holds a typed value, and the quote style chosen for a string decides whether PowerShell reads the variables inside it or leaves the text alone.
The Pipeline and Objects
The pipe character sends whole objects, not lines of text, from one cmdlet to the next, and Where-Object, ForEach-Object, Select-Object, Sort-Object, and Measure-Object are the five cmdlets that do most of the real work once those objects are flowing.
Arrays, Ranges, and Hashtables
A PowerShell array holds items in order and answers to a position, while a hashtable holds pairs and answers to a name, and picking the right one is half the battle in writing a clean script.
Comparisons, if, and Loops
A comparison decides what is true, if and elseif pick which script block runs, and for, foreach, and while repeat a block until a condition says stop.
Functions and Scripts
A function wraps working code in a name so it can be called again with different input, and understanding its parameters and output is what turns a one-off line into a real tool.
Automating a Real Task
A single PowerShell script pulls variables, an array, the pipeline, and a function together to turn a batch of raw numbers into a scored, threshold-checked report.