Work & productivity / QUICK REFERENCE
PowerShell essentials
Discover commands, inspect objects, filter pipelines and work with text and JSON.
Discover the environment
- Version information
$PSVersionTableDistinguishes edition and version. [2]
- Find matching commands
Get-Command *Service*Lists available commands matching the pattern. [2]
- Command help
Get-Help Get-ProcessHelp depth depends on installed help content. [2]
- Help examples
Get-Help Get-Process -ExamplesUses the installed help examples. [2]
- List command parameters
(Get-Command Get-Process).Parameters.KeysInspects the available parameter names. [2]
- Current location
Get-LocationPowerShell locations can use providers beyond the filesystem. [2]
- List files
Get-ChildItemLists items in the current provider location. [2]
- Change directory
Set-Location 'C:\Work'This sample Windows path must exist. [2]
Inspect and filter objects
- Running processes
Get-ProcessProduces process objects. [3]
- Object members
Get-Process | Get-MemberReveals properties and methods. [3]
- Choose output properties
Get-Process | Select-Object Name, IdKeeps selected properties in new output objects. [3]
- Sort by memory
Get-Process | Sort-Object WorkingSet64 -DescendingOrders by numeric working-set size. [3]
- First ten results
Get-Process | Select-Object -First 10Limits output; sorting first changes which results are first. [3]
- Filter a property
Get-Process | Where-Object { $_.WorkingSet64 -gt 100MB }$_ represents the current pipeline object. [3]
- Count results
Get-Process | Measure-ObjectReports how many objects were received. [3]
- Group by a property
Get-Process | Group-Object ProcessNameGroups process objects with the same name. [3]
Text, files and JSON
- Read text lines
Get-Content -LiteralPath 'notes.txt'LiteralPath avoids wildcard expansion. [4]
- Read entire text
Get-Content -LiteralPath 'notes.txt' -RawReturns one string instead of individual lines. [4]
- Search file text
Select-String -LiteralPath 'app.log' -SimpleMatch 'error'Uses literal matching rather than a regular expression. [4]
- Parse JSON
'{"count":3}' | ConvertFrom-JsonCreates objects from JSON data. [4]
- Serialize JSON
@{ name = 'Atlas'; count = 3 } | ConvertTo-JsonSet an appropriate -Depth for nested objects. [4]
- Export selected CSV fields
Get-Process | Select-Object Name, Id | Export-Csv -Path 'processes.csv' -NoTypeInformationWrites or replaces a local CSV file. [4]
- Test whether a path exists
Test-Path -LiteralPath 'notes.txt'Does not guarantee a later read will succeed. [4]
- Join path components
Join-Path 'data' 'notes.txt'Uses the provider's path rules. [4]
Small language patterns
- Set a variable
$name = 'Atlas'Single quotes make a literal string. [1]
- Expand inside a string
"Hello, $name"Double quotes expand variables. [1]
- Array literal
$items = @(1, 2, 3)Wraps values in an array expression. [1]
- Hash table
$record = @{ Name = 'Atlas'; Count = 3 }Stores key/value entries. [1]
- For each item
foreach ($item in 1..3) { $item * 2 }Emits each calculated result. [1]
- Boolean comparison
3 -gt 2Uses named comparison operators. [1]
- Equality
$name -eq 'Atlas'String equality is case-insensitive by default; -ceq is case-sensitive. [1]
- Catch expected failures
try { Get-Content missing.txt -ErrorAction Stop } catch { 'Read failed' }-ErrorAction Stop turns this nonterminating error into a catchable one. [1]
Reserved placement, separate from reference controls. No ad network is active.
No matching entry. Try a shorter word or clear the search to see the complete sheet.
Sources
cheatsheetatlas.com/sheets/powershell/ · Updated 2026-10-19 · PowerShell 7 · object pipelines