PowerShell Fundamentals
PowerShell is a command-line shell, scripting language, and automation framework built on .NET. It sends structured objects between commands, which lets you inspect and manage systems without reducing every result to text.
itWindows and Microsoft infrastructure | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — PowerShell Fundamentals
PowerShell is a command environment that carries objects between commands instead of asking every later tool to reconstruct meaning from text. It exists because administration has a discouraging habit of producing a screen full of values precisely when you need one property from each of them. The shell keeps that property attached to its object until you decide what to do with it.
The important bit is the object pipeline. A command such as Get-Process produces process objects. Where-Object can inspect one property, Sort-Object can order the remaining objects, and Select-Object can make a smaller record for the next command. The pipe is not decoration. It is the route those objects take, with parameter binding deciding how the next command accepts them.
This is why Get-Member deserves more attention than its modest name suggests. When a result is unfamiliar, inspect it. Its properties and methods tell you what can be filtered, sorted, selected, or passed onward. Memorizing a long command catalogue is less useful than knowing how to ask a command what it returned. The shell has, unusually, left some of the labels on.
The surprise waits at the end of the pipeline. Format-Table and Format-List are for people, not for later commands. Put one in the middle and the tidy objects become display instructions, which is a little like turning a filing cabinet into a postcard collection before anyone has finished looking things up. Select data first; format it when the next consumer has eyes.
A provider adds another small piece of mischief. A path can refer to files, environment variables, aliases, functions, certificates, or the Windows registry. The familiar item commands still work, but the provider decides what an item and path mean. Check the drive before assuming a path is a file-system path.
Failures also arrive by more than one door. A terminating error can enter catch. A non-terminating error can report a failed item while a command continues. Native programs have their own exit code, held in $LASTEXITCODE. -ErrorAction Stop and try/catch handle PowerShell command behavior; they do not magically make a native program share it. Computers remain committed to variety.
For current work, start with pwsh and check $PSVersionTable when compatibility matters. Windows PowerShell and current PowerShell can coexist, and a legacy module can require the Windows-only edition. Execution policy is a script-loading safety feature, not permission to change resources.
Open the intro when you need the engine, providers, scope, and error model in one map. Use the slides for the path from host to streams. Keep the cheatsheet nearby when you need a command pattern, a binding rule, or a diagnostic sequence. Then return to Get-Command, Get-Help, and Get-Member. They are the dependable route through the furniture.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://learn.microsoft.com/en-us/powershell/scripting/overview
Supports
- PowerShell combines a command-line shell, scripting language, and automation framework
- PowerShell is cross-platform and passes .NET objects through its pipeline
- PowerShell works with structured data, APIs, and object models
- https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/01-getting-started
Supports
- Command discovery, verb-noun naming, aliases, hosts, and editor choices
- Visual Studio Code with the PowerShell extension supports current PowerShell and Windows PowerShell
- https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/02-help-system
Supports
- Get-Help syntax, parameter, example, and update behavior
- https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/03-discovering-objects
Supports
- Get-Member exposes object types, properties, and methods
- Select-Object projects object properties
- https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/04-pipelines
Supports
- Cmdlets pass objects through pipelines
- Filtering, sorting, selection, and formatting behavior
- Formatting output should remain at the display boundary
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_command_syntax
Supports
- PowerShell command diagrams, parameters, switches, and argument notation
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parameter_binding
Supports
- Explicit and pipeline parameter binding
- Pipeline binding by value and by property name
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_variables
Supports
- Variables store PowerShell values and use dollar-sign notation
- Type constraints and variable scope behavior
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules
Supports
- Expandable and verbatim string behavior
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators
Supports
- Equality, ordering, wildcard, regular-expression, and case-sensitive comparison operators
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_providers
Supports
- Providers expose data stores through drives, paths, and item cmdlets
- Provider-specific dynamic parameters and built-in provider examples
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scripts
Supports
- Script files, parameters, invocation, and scope
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes
Supports
- Visibility and lifetime rules for variables, functions, and aliases
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles
Supports
- Profiles are host and user scoped startup scripts
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_modules
Supports
- Module discovery, import, automatic loading, and exported commands
- https://learn.microsoft.com/en-us/powershell/gallery/overview
Supports
- PowerShell Gallery distributes community and Microsoft modules and scripts
- PSResourceGet discovers and installs PowerShell packages
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_error_handling
Supports
- Terminating and non-terminating error behavior
- ErrorAction Stop promotes a non-terminating error for handling
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_try_catch_finally
Supports
- Try, catch, and finally control flow
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_output_streams
Supports
- PowerShell success, error, warning, verbose, debug, information, and progress streams
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables
Supports
- Error, question-mark, last-exit-code, and script-root automatic variables
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies
Supports
- Execution policy controls script-loading conditions on Windows
- Execution policy is a safety feature rather than a security boundary
- https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-shouldprocess
Supports
- WhatIf and Confirm behavior depends on command support for ShouldProcess
- https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell
Supports
- Current PowerShell and Windows PowerShell use different executables and .NET runtimes
- PowerShell supports Windows, Linux, and macOS while Windows PowerShell is Windows-only
- Compatibility considerations for Windows PowerShell modules
- https://learn.microsoft.com/en-us/training/paths/powershell/
Supports
- Ordered Microsoft Learn material for PowerShell commands, pipelines, and scripting
- https://github.com/sindresorhus/awesome
Supports
- The Awesome index identifies a PowerShell ecosystem list
- https://github.com/janikvonrotz/awesome-powershell
Supports
- Discovery of Pester, PSScriptAnalyzer, PSReadLine, posh-git, ImportExcel, PlatyPS, and Oh My Posh
- https://pester.dev/docs/quick-start/
Supports
- Pester tests and mocks PowerShell commands and scripts
- Pester produces test and code-coverage artifacts
- https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview
Supports
- PSScriptAnalyzer performs configurable static analysis of PowerShell scripts and modules
- https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/using-keyhandlers
Supports
- PSReadLine maps interactive editing functions to configurable key handlers
- https://github.com/dahlbyk/posh-git
Supports
- posh-git adds Git status summaries and completion to PowerShell prompts
- https://github.com/dfinke/ImportExcel
Supports
- ImportExcel reads and writes spreadsheet data, tables, charts, and pivot tables without Excel
- https://github.com/PowerShell/platyPS
Supports
- PlatyPS converts Markdown-authored command help into the format used by Get-Help
- https://ohmyposh.dev/docs/
Supports
- Oh My Posh configures contextual prompt segments across supported shells
- https://learn.microsoft.com/en-us/azure/cloud-shell/overview
Supports
- Azure Cloud Shell provides a browser-accessible authenticated PowerShell environment for Azure
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_windows_powershell_ise?view=powershell-5.1
Supports
- Windows PowerShell ISE is a Windows PowerShell graphical host for editing, running, and debugging scripts
- ISE does not support PowerShell 6 or later and is no longer in active feature development
- https://learn.microsoft.com/en-us/windows/terminal/
Supports
- Windows Terminal hosts command-line profiles including PowerShell and Windows PowerShell
- https://www.sapien.com/software/powershell_studio
Supports
- PowerShell Studio provides a commercial editor, debugger, and packaging environment for PowerShell
- https://learn.microsoft.com/en-us/powershell/scripting/developer/monad-manifesto
Supports
- The 2002 Monad Manifesto established the design vision that became PowerShell
- https://devblogs.microsoft.com/powershell/windows-powershell-1-0-released/
Supports
- Windows PowerShell 1.0 was released in November 2006
- https://devblogs.microsoft.com/powershell/the-community-technology-preview-ctp-of-windows-powershell-2-0/
Supports
- The first PowerShell 2.0 preview introduced remoting, jobs, script cmdlets, and hosting APIs in November 2007
- https://devblogs.microsoft.com/powershell/windows-powershell-2-0-rtm/
Supports
- PowerShell 2.0 reached release to manufacturing with Windows 7 and Windows Server 2008 R2 in July 2009
- https://devblogs.microsoft.com/scripting/powershell-3-0-is-now-available-for-download/
Supports
- PowerShell 3.0 became available through Windows Management Framework 3.0 in September 2012
- https://devblogs.microsoft.com/powershell/windows-powershell-is-now-powershell-an-open-source-project-with-linux-support-how-did-we-do-it/
Supports
- PowerShell became open source and added Linux and macOS support in August 2016
- https://devblogs.microsoft.com/powershell/powershell-core-6-0-generally-available-ga-and-supported/
Supports
- PowerShell Core 6.0 became a supported cross-platform edition in January 2018
- https://devblogs.microsoft.com/powershell/announcing-powershell-7-0/
Supports
- PowerShell 7.0 became generally available in March 2020
- PowerShell 7 improved compatibility while retaining cross-platform operation
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7.6
Supports
- PowerShell pipelines compose command output and can send objects to formatting and export cmdlets
- Formatting output belongs at the display boundary rather than in a data pipeline
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/export-csv?view=powershell-7.6
Supports
- Export-Csv serializes input objects to a CSV file with property names and values
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.6
Supports
- Import-Csv reads CSV rows as objects whose properties come from the header row
