Chapter 02Lesson 02~80 minutes

Get-Help, Update-Help, about_* Topics, and Reading Syntax

Use PowerShell help as an engineering workflow: inspect command syntax, parameters, examples, conceptual topics, updateable help, and valid parameter sets before running unfamiliar automation.

BeginnerGet-HelpSyntax

Learning objectives

By the end of this lesson

  • Use Get-Help in default, detailed, full, examples, parameter, online, and conceptual modes.
  • Explain the difference between local help content, autogenerated metadata help, online help, and Update-Help.
  • Read PowerShell syntax notation including optional elements, parameter types, arrays, parameter sets, and CommonParameters.
  • Answer a practical command-use question using only Get-Command and Get-Help.
  • Recognize when local help is incomplete or version-dependent instead of assuming a missing detail is a command limitation.

1. Help is part of execution planning

An engineer does not need to memorize every option of every command. The more useful skill is knowing how to ask the environment precise questions. In PowerShell, Get-Help is not an appendix you read after a failure; it is part of deciding whether and how to run a command.

Start with a command you discovered in Lesson 01. The default help view gives a synopsis, syntax, and other concise information:

Get-Help Get-ChildItem

If the local computer has full help installed for the module, the result can contain rich descriptions and examples. If full files are unavailable, PowerShell can still generate basic help from command metadata. This is why two machines can show different depth even when the command itself exists.

2. Ask for the amount of help you need

Get-Help has several views. Use the smallest view that answers the question, then expand when you need detail.

Get-Help Get-ChildItem -Detailed
Get-Help Get-ChildItem -Full
Get-Help Get-ChildItem -Examples
Get-Help Get-ChildItem -Parameter Force
Get-Help Get-ChildItem -Online
FormUse it when
DefaultYou need the synopsis and valid syntax shapes.
-DetailedYou need more parameter descriptions and examples without the longest metadata view.
-FullYou are troubleshooting exact parameter metadata, inputs, outputs, notes, or detailed behavior.
-ExamplesYou want supported usage patterns to study before adapting them.
-Parameter NameYou need the type, aliases, required/optional status, position, pipeline acceptance, or description for one parameter.
-OnlineYou want the current online help page, when the command provides a HelpUri and the environment permits opening it.
Examples are evidence, not copy/paste permission

Read the parameter meanings and target scope before adapting an example. A valid example can still be unsafe for your environment if you change the target to production state.

3. about_* topics explain the language and engine

Command help answers “how does this command work?” Conceptual help answers questions about PowerShell itself: parsing, variables, operators, pipeline behavior, command precedence, common parameters, and many other engine concepts. These documents use names beginning with about_.

Get-Help about_* | Select-Object -First 15 Name, Synopsis
Get-Help about_Command_Precedence
Get-Help about_Parsing

The topic names are entered in English even on localized PowerShell installations. If you cannot remember the exact topic name, search the help catalog with a wildcard rather than guessing.

Get-Help about_*parameter*
Get-Help about_*pipeline*

This is an important learning strategy: when behavior seems surprising, look for an about_* topic that describes the engine mechanism instead of treating the surprise as a rule to memorize.

4. Update-Help manages downloadable local help

Many modules support updateable help. Update-Help downloads newer help files and installs them for local use. In current PowerShell, CurrentUser is the default scope for help updates; an all-users update can require elevated privileges.

# Inspect the command before deciding whether to use the network.
Get-Help Update-Help -Detailed

# Optional: requires network access and module support for updateable help.
Update-Help -Scope CurrentUser -ErrorAction Continue

Not every module publishes updateable help, network access may be restricted, and help content can differ by module version or UI culture. A failed or incomplete help update does not automatically mean the underlying command is broken.

Offline environments

Teams can use Save-Help on a connected machine and provide a file-share/source path to Update-Help. The engineering principle is to make documentation availability an explicit dependency rather than silently assuming internet access.

5. Read syntax as a set of valid command shapes

The syntax block is compact because it describes a grammar, not because you are expected to type every token. Ask PowerShell for syntax only:

Get-Command Get-ChildItem -Syntax
Get-Help Get-ChildItem -Full | Select-Object -First 60

Different lines in a syntax display usually represent different parameter sets: alternative valid ways to invoke the same command. You choose one compatible shape; you do not combine unique parameters from incompatible sets.

NotationHow to read it
-Path <String[]>A parameter named Path whose value is an array (zero/one/many values depending on command semantics) of strings.
Square brackets around a parameter/valueThe syntax notation marks that element optional in that parameter set. Do not type the brackets themselves.
A parameter shown without a separate value typeOften a switch parameter: presence means “enabled” rather than supplying a separate value.
Multiple Syntax headings/linesAlternative parameter sets. Use a compatible combination from one set.
[<CommonParameters>]PowerShell common parameters are available in addition to command-specific parameters.

Angle-bracket type names describe expected values; they are not literal text to type. The [] attached to a .NET type such as String[] means an array of that type. This differs from square brackets used by documentation syntax to mark optional elements—the surrounding context tells you which meaning applies.

6. Inspect one parameter instead of guessing

Suppose you need to list items that PowerShell does not normally display. Rather than guessing that a parameter called -All exists, query the command metadata and help.

Get-Command Get-ChildItem |
    Select-Object -ExpandProperty Parameters |
    Select-Object -ExpandProperty Keys |
    Sort-Object

Get-Help Get-ChildItem -Parameter Force

The parameter help tells you that -Force changes what the command includes or accesses, subject to provider behavior. This is a stronger workflow than trial-and-error because you can read the parameter type, accepted position, pipeline metadata, and description before execution.

7. Guided investigation: answer a practical question using only discovery and help

Question: How can I recursively list items beneath my home directory while limiting the traversal depth if the command supports that capability? Do not search the web first. Ask the shell.

$cmd = Get-Command Get-ChildItem
$cmd | Select-Object Name, CommandType, Source, Version

Get-Help Get-ChildItem -Parameter Recurse
Get-Help Get-ChildItem -Parameter Depth
Get-Command Get-ChildItem -Syntax

Now construct a read-only command from the evidence. The following asks for one level below the home directory. If your installed version/provider documents different semantics, follow the local help for that environment:

Get-ChildItem -LiteralPath $HOME -Recurse -Depth 1 |
    Select-Object -First 20 FullName, PSIsContainer

The key lesson is the method: identify the command, inspect the relevant parameters, confirm they can coexist in a valid parameter set, then run a bounded read-only example.

8. Help is versioned documentation

Help belongs to a specific command implementation and module version. A blog post or another machine may document a parameter your installed version does not have. Conversely, locally generated metadata help may omit narrative detail that exists online.

Get-Command Get-ChildItem | Select-Object Name, Source, Version
Get-Help Get-ChildItem | Select-Object Name, Category, Synopsis

When a production script depends on a version-specific parameter, record that dependency explicitly. Later you will use module manifests, #requires, tests, and CI matrices to enforce such assumptions.

9. Lab: build a help-first command plan

Choose one safe command from this list: Get-Date, Get-Location, Get-Item, or Get-Random. Create a small evidence report before running a non-default form of it.

$target = 'Get-Item'

Get-Command $target |
    Select-Object Name, CommandType, Source, Version

Get-Help $target
Get-Help $target -Examples
Get-Help $target -Parameter LiteralPath
Get-Command $target -Syntax

From the output, write one sentence describing what the command does, one valid parameter set you intend to use, the type of the important parameter, and whether the operation is read-only. Then run the smallest safe example:

Get-Item -LiteralPath $HOME | Select-Object FullName, PSIsContainer

Verification checklist

10. Common help-system mistakes

Assuming missing local prose means no documentation exists. Basic metadata help may be available even when downloadable help files are not. Check online help when appropriate.

Typing documentation brackets literally. Syntax brackets usually describe optionality; they are not part of the command.

Mixing separate parameter-set lines. Each syntax line is an alternative valid shape. Incompatible combinations produce parameter-set resolution errors.

Treating examples as a replacement for parameter understanding. Examples show patterns. Parameter help explains the contract.

Running Update-Help as Administrator by habit. Prefer current-user scope unless an all-users update is a deliberate requirement.

11. Knowledge check

Question 1. What is the quickest Get-Help form for seeing only examples?

Question 2. What does a second syntax line usually mean?

Question 3. Why might two machines show different Get-Help detail for the same command name?

Question 4. What does String[] mean in parameter metadata?

Question 5. Which conceptual-help search would help you investigate parser behavior?

12. Summary

PowerShell help is executable engineering context. Use command metadata to establish identity, Get-Help views to understand behavior, about_* topics to understand engine concepts, and updateable help when local narrative content needs refreshing. Most importantly, read syntax as a set of parameter-set contracts rather than a line of punctuation to memorize.

13. Further reading

Next lesson

Read parameters as a binding contract

Lesson 03 goes deeper into named and positional parameters, switches, arrays, parameter sets, common parameters, and the first mental model of parameter binding.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0 Send only Ethereum/ERC-20 compatible assets to this address.