PowerShell Basics Level: Beginner Chapter 2: Your First PowerShell Commands

Syntax: Verb-Noun and parameters

Every PowerShell command follows the same shape: a verb, a noun, and optional parameters. Once you see the pattern, new commands become easy to guess.

Lesson 4 of 5 in Chapter 2: Your First PowerShell Commands. Previous step in this path: Work environments: ISE, console, and VS Code. 3 learning objectives, 6 examples, and a knowledge check.

Start: what you will learn

Every PowerShell command follows the same shape: a verb, a noun, and optional parameters. Once you see the pattern, new commands become easy to guess.

Learning objectives

  • Read a Verb-Noun command and name its parts
  • Use a parameter to change what a command does
  • Use Get-Command to discover commands

Concept in simple words

What it is: PowerShell syntax, which means the shape a command must follow, is Verb-Noun plus optional parameters. The verb says what to do, the noun says what to work on, and a parameter changes the details. Syntax is not a separate subject to memorise. It is the shape you will see in every command in this chapter, and in every chapter after it.

Why it works

Why it exists: Without a shared shape, every command would be a new puzzle. You would have to learn each name from scratch, and you could not guess a command you had not seen before. With Verb-Noun, the action word and the target word are always in the same places, so a new command feels familiar even the first time you meet it.

What problem it solves: Imagine you know Get-Service, and now you need to work with processes. You do not need to search for a completely new word. You keep the verb Get, because you still want to retrieve something, and you change only the noun, from Service to Process, which gives you Get-Process. The pattern turns learning one command into learning a family of commands.

Why it works this way: Verbs come from an approved list, so commands stay consistent across PowerShell. Once you know Get-Service, you can guess Get-Process, because Get always means retrieve, and only the noun changes. That consistency is what makes new commands easier to learn. An approved verb is a verb Microsoft has chosen for one kind of action, so that different commands do not use different words for the same action.

Think of it like this

Think of it like this: It is like a simple sentence, verb first, then the thing you are acting on. Get-Service reads like get the service, just as Get-Process reads like get the process. A parameter is like an extra instruction at the end, such as, only the one named Spooler.

A second analogy that helps: Think of a kitchen instruction: chop the onion, or only the red onion. Chop is the action, onion is the thing, and red is the extra detail that narrows the job. In PowerShell, Get is the action, Service is the thing, and -Name Spooler is the extra detail that narrows the job to one service.

The parts, one by one: The verb is the word before the hyphen, and it is the action. Common beginner verbs are Get, which retrieves, Set, which changes a setting, New, which creates, Remove, which deletes, Start, which starts, Stop, which stops, and Test, which checks. The noun is the word after the hyphen, and it is the target, such as Service, Process, or Date. The hyphen is the separator between verb and noun, and it is part of the command name, not a minus sign.

Parameters, in depth: A parameter starts with a hyphen and a name, such as -Name, and it often carries a value after it, such as Spooler. Some parameters are switches, which means they take no value at all. They simply turn something on, such as -Examples in Get-Help. A parameter never changes the verb. It only changes the scope, the detail, or the shape of the result. That is why Get-Service and Get-Service -Name Spooler are the same action, with a different scope.

Positional and named values, in simple words: Most parameters are named, which means you write the parameter name and then the value, such as -Name Spooler. Some parameters can also take a value by position, which means PowerShell knows which parameter you mean from where the value sits, even if you do not write the name. Named form is clearer for a learner and for a script reader, so use the name in this chapter, even when a shorter form would also work.

How it works, step by step

How it works, step by step: First, read the command from left to right and split it at the hyphen. The word before the hyphen is the verb, and the word after it is the noun. Then look for parameters, which start with a hyphen and a name, and often carry a value after them. Read the value as the answer to a question: which one, how many, or in what form.

How it works, step by step, continued: Next, if you do not know a command, use Get-Command to discover it. For example, Get-Command -Noun Service lists commands that work on services. Read the list, pick the verb that matches your goal, and then check its help before you run it. Discovery before running is a habit that protects you, because the list shows you what exists, instead of letting you guess a name that does not exist.

Let us walk through an example: In Get-Service -Name Spooler, Get is the verb, Service is the noun, -Name is the parameter, and Spooler is the value for that parameter. Without -Name, the command lists all services. With -Name Spooler, it narrows the result to one service, so the parameter changes the scope, not the action.

Walkthrough, what changes if you change one part: If you change Get to Stop, the action changes completely, from reading to stopping, so never change a verb casually. If you change Service to Process, the target changes, and you get processes instead of services. If you change Spooler to another service name, you get that service instead. If you drop -Name Spooler, you get the full list again. Each part has one job, and changing one part changes only that job, which is why reading a command part by part is so reliable.

Let us walk through a second example: In Get-Command -Verb Get -Noun Process, Get-Command is the discovery command, -Verb is a parameter that narrows by action, Get is its value, -Noun is a parameter that narrows by target, and Process is its value. The result should include Get-Process, which shows that the Verb-Noun pattern is not a guess, it is how commands are organised. If you drop -Noun Process, the list grows to all Get commands. If you drop -Verb Get, the list grows to all commands about processes, whatever their verb.

Let us walk through a third example: In Get-Verb, Get is the verb and Verb is the noun, and the result is the approved verb list itself. Look for the Verb column and the Description column. The description tells you what each verb means, so you can pick the right verb before you guess a command name. If you are torn between two verbs, Get-Verb is the place to settle it.

What Get-Command returns, and how to read it: Get-Command returns command objects, and its display usually shows the command name and the module it comes from. A module is a package of commands. Do not be surprised if a broad search returns a long list. That is normal, and it is why the -Verb and -Noun filters exist. Narrow first, then read the short list, instead of scrolling through a long one.

When to use it

When to use it, and when not to: Use the full parameter name in scripts, because it is clear to anyone who reads the script later. Shortened parameter names can be fine when you are typing quickly for yourself, but do not use a shortened form if it could be read as a different parameter. And never use a verb that changes something, such as Stop, Remove, or Set, until you have read its help and you are sure about its target and its parameters.

Common edge cases to expect: First, some command names have more than one word after the hyphen, such as a noun with a prefix, so split at the first hyphen, not at every capital letter. Second, a parameter value with a space needs quotes, because without quotes PowerShell may read it as two separate values. Third, PowerShell command names are not case sensitive, so get-service and Get-Service mean the same thing, but keeping the usual capitalisation makes your commands easier to read.

Worked examples

Read each example in order. Each one explains its parts, then shows what to look for in the output.

Syntax

Syntax
Verb-Noun -Parameter value

Example 1

Lists commands whose noun is Service, so you can discover what exists before you guess.

Example 1
Get-Command -Noun Service

Illustrative output: Get-Service Set-Service Restart-Service

Example 2

The -Name parameter narrows the result to one service.

Example 2
Get-Service -Name Spooler

Illustrative output: Status Name ------ ---- Running Spooler

Example 3

Get-Command lists commands, -Verb narrows the list to commands whose action is Get, and -Noun narrows it further to commands that work on processes. The result should include Get-Process, which shows that the Verb-Noun pattern is not a guess, it is how commands are organised.

Example 3
Get-Command -Verb Get -Noun Process

Illustrative output: Get-Process

Example 4

Lists the approved verbs, with a short description of what each verb means. Look for the Verb column first, then read the Description column for a verb you are unsure about. Use this list before you guess a verb for a new command.

Example 4
Get-Verb

Illustrative output: Verb Description ---- ----------- Get Retrieve information Set Change a setting

Example 5

A wildcard search. The stars mean any text before and after Process, so this finds commands with Process anywhere in the name. Look for Get-Process in the result, and notice that the list is longer than the filtered -Verb and -Noun search, because a wildcard search is broader.

Example 5
Get-Command *Process*

Illustrative output: Get-Process Stop-Process

Example 6

A parameter that changes the shape of the result, not the target. Get-Date still gets the date, but -DisplayHint Date shows only the date part, not the time. Change Date to Time to see only the time part, which proves that the parameter controls the display, while the verb and noun stay the same.

Example 6
Get-Date -DisplayHint Date

Illustrative output: Monday, 3 November 2026

Nothing on this page executes PowerShell code. The outputs above are illustrative only.

Common mistakes and troubleshooting

Read these before you try the examples, so you can spot the same problems in your own work.

  • Writing the verb and noun in the wrong order, such as Service-Get. The verb always comes first.
  • Forgetting the hyphen before a parameter name, which PowerShell then reads as a separate value.
  • Typing the noun before the verb, such as Service-Get, and then wondering why PowerShell cannot find the command.
  • Changing the verb without thinking, for example swapping Get for Stop or Remove. That changes reading into changing or deleting, so check the verb first, every time.
  • Dropping the quotes around a value that contains a space. PowerShell may then read it as two values instead of one, and the command will fail or target the wrong thing.
  • Using a shortened parameter name that could match more than one parameter. If PowerShell cannot tell which parameter you mean, it will complain, so use the full name when you are unsure.

Knowledge check

Knowledge check

In Get-Service, which part is the verb?

Pick one answer. Feedback appears right away, and you can try again.

Remember this and next step

Remember this: Verb first, noun second, then parameters with a hyphen, and when you are unsure, discover the command with Get-Command and read its help. If you can name each part of a command, you can read any new command with confidence.

Next step: Getting help: Get-Help, About, and IntelliSense