Pcornel
Windows · PowerShell

PowerShell Fundamentals

Cheat sheet · https://pcornel.dk/topic.php?topic=3038

Back to the Topic

Answer

PowerShell Fundamentals covers the minimum mental model needed to use PowerShell predictably: a host runs an engine, commands are resolved from aliases/functions/cmdlets/scripts/applications, parameters are bound, objects flow through streams/pipelines, and providers expose stores such as the filesystem or Registry through a common navigation model.

Remember

  • $PSVersionTable is the first identity check for engine/version/edition.
  • Get-Command tells you what PowerShell can resolve and where a command comes from.
  • Get-Help documents syntax and semantics; updateable help may vary with installed modules/help content.
  • PowerShell has multiple output streams; success output is only one of them.
  • Providers can make non-filesystem stores look path-like without turning them into ordinary files.

First 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

Verify in this order

verb-noun cmdlet → objects → pipeline → formatting at the end

Where it usually breaks

First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.

PowerShell → PowerShell Fundamentals reference map

ItemMeaningEvidence boundary
Host/engineRuns PowerShellidentity/version before behavior comparison
Command discoveryResolves command namesource/type can differ by session
Parameter bindingMaps input to parametersbinding success does not prove target success
StreamsSuccess/error/warning/etc.screen display can combine or redirect streams
ProviderPath-like access to a data storeprovider path is not necessarily filesystem data

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3038

Confirmation

Confirm action

Continue?