Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

PowerShell

Direct answer

PowerShell is an automation shell, scripting language and management framework built around .NET objects. On Windows, distinguish the inbox Windows PowerShell 5.1 product from modern PowerShell 7, which installs side-by-side as pwsh and has a separate support lifecycle.

When to use this

Use this branch when you need to understand why PowerShell behaves differently from cmd.exe, choose between Windows PowerShell 5.1 and PowerShell 7, reason about object pipelines, build reusable scripts/functions/modules, or troubleshoot remoting and execution behavior.

First 30 seconds

1. $PSVersionTable — Windows PowerShell 5.1 or PowerShell 7?

2. Get-Command <name> — the command exists in this version?

3. Errors: $Error[0] | fl * -Force.

4. Script blocked? Get-ExecutionPolicy -List.

5. Remote? Test-WSMan <host>.

Operational verification

host and version → module loaded → command found → objects through the pipeline → output or error

Evidence · next step

Inspect the first unresolved boundary: command resolution, parameter binding, object type, remote/session transport, or target-state verification.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

Do not debug PowerShell by reading formatted output as if it were raw data. Do not assume the same command name resolves to the same module/function/alias across hosts. Do not treat a zero-error invocation as evidence that an external dependency or remote target is healthy. Establish the host, command source, input object type and target boundary first.

Platform / version applicability
Windows execution, automation and observability
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows execution, automation and observability · Windows / Windows Server / PowerShell
Key commandSelect-String -Path <file> -Pattern <text>
Scope / prerequisiteUse this branch when you need to understand why PowerShell behaves differently from cmd.exe, choose between Windows Pow…
Reference · 2
What next?3 suggested next steps
Child topics (this level)16
Catalog command links2
Evidence2
On this pageJump to a specific section
Windows command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Capture $PSVersionTable, then resolve commands with Get-Command and inspect objects with Get-Member or direct property access. For state-changing work, capture before-state, invoke the smallest intended change, test $?/errors only as execution evidence, and query the authoritative target state afterward.

Step 2 Operational verification Verify boundary

Object-based command-line administration, remoting, pipelines, modules and repeatable infrastructure automation.

Fast verification

  • Use Get-Command, Get-Help and Get-Member to verify command discovery, syntax and object shape.

- Inspect $Error[0], exception details and $LASTEXITCODE when native tools are involved.

- Preserve objects through the pipeline; format only at the presentation boundary.

Evidence references

Evidence · 2 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1command output · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic PowerShell Fundamentals

Core PowerShell language and runtime concepts, including hosts, editions, command discovery, help, providers, streams and the object-oriented execution model.

Subtopic Cmdlets

PowerShell cmdlet model: Verb-Noun naming, parameters, common parameters, parameter sets, binding, ShouldProcess and discoverability.

Subtopic Objects

PowerShell object model: .NET types, properties, methods, extended type system, calculated properties, serialization and formatting boundaries.

Subtopic Pipeline

PowerShell pipeline behavior: object streaming, parameter binding, streaming vs collecting, native command boundaries, filtering, projection and formatting.

Subtopic Variables

PowerShell variable semantics: scalar/reference behavior, scope, automatic/preference variables, environment variables, type constraints and lifecycle.

Subtopic Arrays

PowerShell array and collection behavior: scalar-vs-array output, indexing, enumeration, unary comma, ArrayList/generic collections and pipeline collection boundaries.

Subtopic Hash Tables

PowerShell hash table/dictionary model: key/value storage, ordered dictionaries, splatting, property bags and lookup/mutation behavior.

Subtopic Functions

PowerShell function model: parameters, advanced functions, pipeline input, Begin/Process/End/Clean, scope, output contracts and ShouldProcess.

Subtopic Modules

PowerShell module packaging and discovery: manifests, script/binary modules, module path, auto-loading, exported commands, dependencies, versions and compatibility.

Subtopic Scripts

PowerShell script execution model: .ps1 files, parameters, scope, invocation operators, dot-sourcing, exit behavior, signing, dependencies and reproducibility.

Subtopic Execution Policy

PowerShell execution policy scopes and precedence on Windows, including Restricted/RemoteSigned/AllSigned/Bypass/Undefined and Group Policy control.

Subtopic Profiles

PowerShell profile scripts: host/user scope combinations, $PROFILE paths, startup customization, reproducibility and profile-related troubleshooting.

Subtopic PowerShell Remoting

PowerShell Remoting/PSRP model: one-to-one and one-to-many sessions, WinRM/WSMan on Windows, SSH transport, session configurations, authentication, serialization and authorization.

Subtopic WinRM

Windows Remote Management (WinRM) as WS-Management service/transport for Windows PowerShell remoting and other management clients: listeners, service state, authentication, firewall and endpoint boundary.

Subtopic Error Handling

PowerShell error model: terminating vs non-terminating errors, error records, try/catch/finally, ErrorAction, $Error, $? and native-process exit codes.

Subtopic PowerShell Troubleshooting

Evidence-first troubleshooting method for PowerShell host/version, command discovery, parameter binding, object pipelines, modules, scripts, remoting, WinRM and error handling.

Key points
  • PowerShell pipelines normally pass .NET objects, not lines of text.
  • Windows PowerShell 5.1 and PowerShell 7 are separate products and can coexist on Windows.
  • Cmdlets follow a Verb-Noun naming model and emit typed objects that later commands can inspect or transform.
  • Execution policy is a safety feature, not a security boundary.
  • Remoting success depends on transport, authentication, endpoint/session configuration and authorization, not merely network reachability.
Key checks
  • $PSVersionTable — PowerShell edition and version
  • Get-Command <name> — which cmdlet/function/exe runs
  • Get-Help <cmdlet> -Full — syntax and parameters
  • Get-ExecutionPolicy -List — execution policy per scope
ReferenceWhat it is3 sections · depth on demand

Operational scope

Object-based command-line administration, remoting, pipelines, modules and repeatable infrastructure automation.

What it is

Object-based command-line administration, remoting, pipelines, modules and repeatable infrastructure automation.

Core model

PowerShell combines a command shell with a scripting language and a rich object model. The defining operational difference from traditional text shells is that PowerShell commands can pass structured objects through the pipeline. Formatting is applied late for display, so what appears on screen is often only a selected view of a richer object.

ReferenceWhy it matters1 section · depth on demand

When to use it

Use PowerShell when the problem concerns Windows Server, PowerShell, identity, policy, networking, roles or event-driven operations.

ReferenceHow it works1 section · depth on demand

How it works

Object-based command-line administration, remoting, pipelines, modules and repeatable infrastructure automation.

ReferenceImportant terms & boundaries2 sections · depth on demand

PowerShell boundary

On Windows, always establish which host you are using. Windows PowerShell 5.1 uses powershell.exe and the full .NET Framework. Modern PowerShell 7 uses pwsh.exe, modern .NET and can run side-by-side. This matters for module compatibility, remoting endpoints, startup profiles and behavior of some cmdlets. Treat product/version as part of evidence, not as decoration.

Key operational limits

  • PowerShell returns objects; inspect properties and error records rather than formatted text alone
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows execution, automation and observability current

Authoritative/upstream documentation reviewed for bounded claims in PowerShell. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/powershell/ · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
powershellpowershell windowswindows powershellwindows powershell vs powershell 7PowerShell troubleshootingpwsh powershellpowershell object pipeline
Embedded reference data

Quick lookup tables

PowerShell evidence chain

Configuration, operational state, counters and downstream proof remain separate.

BoundaryQuestionEvidenceDoes not prove
DefinitionWhat is configured or intended?running configuration / controller policylive operation
Local stateIs the feature active at the expected scope?$PSVersionTableremote success
CountersDid controlled traffic or an event reach this stage?scoped counters/timestampscomplete return path
Next boundaryWhat consumes or transports this state?computer/domain context → effective policy/configuration → role/service → dependency/replication/network → event evidence → user/service outcomeapplication success

PowerShell reference map

Fast lookup boundaries for PowerShell.

ItemMeaningEvidence boundary
Windows PowerShell 5.1Inbox Windows productpowershell.exe; .NET Framework; Windows lifecycle
PowerShell 7Separate modern productpwsh.exe; modern .NET; own lifecycle
PipelineObject transport between commandssuccessfully receiving an object does not prove downstream state
ModuleCommand packaging/discovery boundaryimport/discovery does not prove target operation success
RemotingRemote execution frameworktransport reachability does not prove endpoint/authz/function
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Treat pending, requires-reboot, disabled, stopped, degraded, replicating, stale, denied, not-applicable and unknown as distinct from healthy.

Do not map a zero exit code, PowerShell success stream or green MMC icon directly to closure; interpret provider-specific state and any pending action.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Confirmation

Confirm action

Continue?