Skip to content

Glossary of PowerShell Terms

Note

Quick reference definitions for common PowerShell terminology and concepts.

Overview

This glossary provides clear, beginner-friendly definitions for PowerShell terms you'll encounter frequently. Each term includes a brief explanation and, where helpful, a simple example.


A

Alias

A short name for a cmdlet or function. Makes commands faster to type.

# 'ls' is an alias for Get-ChildItem
ls  # Same as Get-ChildItem

Argument

A value you pass to a parameter when running a command.

Get-Process -Name "powershell"  # "powershell" is the argument

Array

A collection that holds multiple values in a single variable.

$colors = @("Red", "Green", "Blue")
$colors[0]  # "Red"

Assignment

Storing a value in a variable using =.

$name = "Raymond"  # Assigns "Raymond" to $name


B

Boolean

A true/false value. Uses $true or $false.

$isActive = $true
if ($isActive) { Write-Output "Active!" }

Background Job

A command that runs in the background without blocking your current session.

Start-Job -ScriptBlock { Get-Process }

Backtick `

The escape character in PowerShell. Used to continue lines or escape special characters.

Write-Output "Line 1`nLine 2"  # `n is newline

Break

Exits a loop or switch statement immediately.

foreach ($num in 1..10) {
    if ($num -eq 5) { break }  # Stops at 5
}


C

Cmdlet

A PowerShell command built using the Verb-Noun naming convention.

Get-Process  # Cmdlet with verb "Get" and noun "Process"

Comment

Text that PowerShell ignores, used for documentation.

# This is a comment
<# This is a
   multi-line comment #>

Comparison Operator

Operators used to compare values: -eq, -ne, -gt, -lt, etc.

5 -gt 3  # $true (5 is greater than 3)

Continue

Skips the current iteration of a loop and moves to the next one.

foreach ($num in 1..5) {
    if ($num -eq 3) { continue }
    Write-Output $num  # Skips 3
}

CIM (Common Information Model)

A standard for accessing management information, often used instead of WMI.

Get-CimInstance -ClassName Win32_OperatingSystem


D

Data Type

The kind of data a variable holds: string, integer, boolean, array, etc.

[string]$name = "Raymond"
[int]$age = 30

Default Parameter

A parameter with a pre-set value if no argument is provided.

function Greet {
    param([string]$Name = "World")
    Write-Output "Hello, $Name"
}

Dot Notation

Using a period (.) to access properties or methods of an object.

$process = Get-Process | Select-Object -First 1
$process.Name  # Access the Name property

Dot Sourcing

Running a script in the current scope so its variables/functions remain available.

. .\MyScript.ps1  # Note the dot and space before the path


E

Environment Variable

A variable stored by the operating system, accessible via $env:.

$env:USERNAME  # Current user name
$env:PATH      # System PATH variable

ErrorAction

A common parameter that controls what happens when an error occurs.

Get-Item "C:\NonExistent" -ErrorAction SilentlyContinue  # Suppresses error

Escape Character

The backtick (`) used to treat special characters as literals.

Write-Output "`$name"  # Outputs: $name (not the variable value)

Execution Policy

Security setting that controls whether scripts can run.

Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Exit Code

A number returned by a script/program indicating success (0) or failure (non-zero).

exit 0  # Success
exit 1  # Error


F

Filter

A type of function optimized for pipeline processing.

filter Get-LargeFiles {
    if ($_.Length -gt 1MB) { $_ }
}

Format Cmdlets

Commands that format output for display: Format-Table, Format-List, Format-Wide.

Get-Process | Format-Table Name, CPU

Function

A reusable block of code you can call by name.

function Get-Greeting {
    param([string]$Name)
    return "Hello, $Name!"
}


H

Hash Table (Hashtable)

A collection of key-value pairs.

$person = @{
    Name = "Raymond"
    Age = 30
    City = "Portland"
}
$person["Name"]  # "Raymond"
$person.Age      # 30

Here-String

Multi-line string that preserves formatting.

$text = @"
Line 1
Line 2
"@


I

ISE (Integrated Scripting Environment)

Built-in PowerShell editor with debugging tools.

ise  # Launches PowerShell ISE

Interpolation

Embedding variables inside double-quoted strings.

$name = "Raymond"
"Hello, $name!"  # "Hello, Raymond!"


J

Job

See Background Job.


L

Literal

A value written exactly as-is in code.

$count = 42       # 42 is a numeric literal
$text = "Hello"   # "Hello" is a string literal

Loop

Code that repeats multiple times: foreach, for, while, do-while.

foreach ($num in 1..5) {
    Write-Output $num
}


M

Method

An action you can perform on an object.

$text = "PowerShell"
$text.ToUpper()  # Calls the ToUpper() method

Module

A package of cmdlets, functions, and other resources.

Import-Module ActiveDirectory
Get-Module -ListAvailable

Mandatory Parameter

A parameter that must be provided when running a command.

function Test {
    param(
        [Parameter(Mandatory=$true)]
        [string]$Name
    )
}


N

Named Parameter

Specifying parameter name explicitly when calling a command.

Get-Process -Name "powershell"  # -Name is explicitly named

Noun

The second part of a cmdlet name (after the verb).

Get-Process  # "Process" is the noun

Null

Represents "no value" or "nothing". Uses $null.

$result = $null
if ($null -eq $result) { Write-Output "Empty" }


O

Object

A structured piece of data with properties and methods.

$process = Get-Process | Select-Object -First 1
$process.Name      # Property
$process.Kill()    # Method

Operator

Symbol that performs an operation: arithmetic (+, -), comparison (-eq, -gt), logical (-and, -or).

$sum = 5 + 3       # Arithmetic operator
$check = 10 -gt 5  # Comparison operator

Output

Data returned by a command, often sent to the pipeline.

$result = Get-Process  # Output stored in variable
Get-Process | Format-Table  # Output formatted for display


P

Parameter

Input that a cmdlet, function, or script accepts.

Get-Process -Name "powershell"
#           ^^^^^ parameter

Pipeline

Passing output from one command as input to another using |.

Get-Process | Where-Object {$_.CPU -gt 50} | Format-Table

Pipeline Variable

$_ (or $PSItem) represents the current object flowing through the pipeline.

Get-Process | Where-Object {$_.Name -like "power*"}
#                            ^^^^ current object

Positional Parameter

A parameter you can specify without using its name (based on position).

Get-ChildItem "C:\Temp"  # Path is positional (no -Path needed)

Property

Information stored in an object.

$file = Get-Item "C:\file.txt"
$file.Name      # Property
$file.Length    # Property

Provider

A PowerShell adapter that makes data stores look like file systems.

Get-PSProvider  # List providers
cd HKCU:\       # Navigate registry like a file system

PSCustomObject

A custom object you create with specific properties.

$user = [PSCustomObject]@{
    Name = "Raymond"
    Role = "Admin"
}


R

Recurse

Process items in a directory and all subdirectories.

Get-ChildItem -Path C:\Data -Recurse

Regex (Regular Expression)

Pattern matching syntax for finding text.

"abc123" -match "\d+"  # Matches digits

Remote Session

Connection to another computer to run commands remotely.

$session = New-PSSession -ComputerName Server01
Invoke-Command -Session $session -ScriptBlock { Get-Process }

Return

Exits a function and optionally returns a value.

function Get-Sum {
    param($a, $b)
    return $a + $b
}


S

Scope

Where a variable or function is accessible: local, script, or global.

$script:configPath = "C:\config.json"  # Script scope
$global:userName = "Raymond"           # Global scope

Script Block

Code enclosed in curly braces {}.

$code = { Get-Process }
& $code  # Execute the script block

Splatting

Passing parameters as a hash table for readability.

$params = @{
    Path = "C:\Temp"
    Recurse = $true
}
Get-ChildItem @params

String

Text data enclosed in quotes.

$name = "Raymond"     # Double quotes
$literal = 'Hello'    # Single quotes

Switch Statement

Checks one value against multiple possible matches.

switch ($value) {
    1 { "One" }
    2 { "Two" }
    default { "Other" }
}

Switch Parameter

A parameter that acts like an on/off flag (no value needed).

Get-ChildItem -Recurse  # -Recurse is a switch (on/off)


T

Ternary Operator

Short if/else syntax (PowerShell 7+).

$result = ($age -gt 18) ? "Adult" : "Minor"

Try-Catch-Finally

Error handling structure.

try {
    Get-Content "C:\file.txt"
} catch {
    Write-Error "File not found"
} finally {
    Write-Output "Done"
}

Type

The kind of data: [string], [int], [bool], [array], etc.

[int]$number = 42
$number.GetType()  # System.Int32


V

ValidateSet

Restricts a parameter to specific allowed values.

function Set-Color {
    param(
        [ValidateSet("Red","Green","Blue")]
        [string]$Color
    )
}

Variable

A named container that stores data. Always starts with $.

$name = "Raymond"
$count = 100
$isActive = $true

Verb

The first part of a cmdlet name (describes the action).

Get-Process   # "Get" is the verb
Set-Location  # "Set" is the verb

Verbose

Detailed output showing what a command is doing.

Get-Process -Verbose
Write-Verbose "Processing file..." -Verbose


W

WhatIf

Shows what would happen without actually doing it.

Remove-Item "C:\file.txt" -WhatIf
# Output: "What if: Performing the operation..."

Where-Object

Filters objects based on conditions.

Get-Process | Where-Object {$_.CPU -gt 50}

While Loop

Repeats code while a condition is true.

$count = 0
while ($count -lt 5) {
    Write-Output $count
    $count++
}

Wildcard

Pattern matching using * and ?.

Get-ChildItem "*.txt"      # All .txt files
Get-Process -Name "power*" # All processes starting with "power"

WMI (Windows Management Instrumentation)

Legacy system for accessing Windows management data.

Get-WmiObject -Class Win32_OperatingSystem
# Note: CIM cmdlets are preferred over WMI in modern PowerShell


X, Y, Z

XML

Structured data format that PowerShell can read and manipulate.

[xml]$data = Get-Content "C:\config.xml"
$data.root.item


Symbols

$ (Dollar Sign)

Prefix for all variables.

$myVariable = "value"

$_ (Dollar Underscore)

The current object in a pipeline. Same as $PSItem.

Get-Process | Where-Object {$_.CPU -gt 50}

@ (At Sign)

  • Array: @(1, 2, 3)
  • Hash table: @{Key="Value"}
  • Splatting: @params
  • Here-string: @" text "@

- (Hyphen/Dash)

  • Parameter prefix: -Name, -Path
  • Comparison operators: -eq, -ne, -gt
  • Logical operators: -and, -or, -not

| (Pipe)

Sends output from one command as input to another.

Get-Process | Where-Object {$_.CPU -gt 50}

{ } (Curly Braces)

Encloses code blocks and script blocks.

if ($true) { Write-Output "Yes" }
$code = { Get-Process }

[ ] (Square Brackets)

  • Array indexing: $array[0]
  • Type casting: [int]$number
  • Wildcard ranges: [a-z]

( ) (Parentheses)

  • Groups expressions
  • Calls methods: $text.ToUpper()
  • Subexpressions: "Result: $($a + $b)"

.. (Range Operator)

Creates a sequence of numbers.

1..5       # Creates: 1, 2, 3, 4, 5
foreach ($num in 1..10) { Write-Output $num }

:: (Double Colon)

Accesses static methods and properties of .NET classes.

[Math]::Round(3.14159, 2)  # 3.14
[DateTime]::Now            # Current date/time


Quick Reference: Common Cmdlets

Cmdlet What It Does
Get-Command Lists all available commands
Get-Help Shows help for a command
Get-Member Shows properties and methods of objects
Get-ChildItem Lists files and folders
Get-Content Reads file content
Set-Content Writes content to a file
Get-Process Lists running processes
Get-Service Lists Windows services
Where-Object Filters objects
ForEach-Object Processes each object
Select-Object Selects properties or items
Sort-Object Sorts objects
Measure-Object Calculates statistics
Group-Object Groups objects
Export-Csv Exports data to CSV
Import-Csv Imports data from CSV

Quick Reference: Common Operators

Operator Meaning Example
-eq Equal to 5 -eq 5$true
-ne Not equal to 5 -ne 3$true
-gt Greater than 10 -gt 5$true
-lt Less than 3 -lt 5$true
-ge Greater than or equal 5 -ge 5$true
-le Less than or equal 3 -le 5$true
-like Wildcard match "test" -like "t*"$true
-match Regex match "abc123" -match "\d"$true
-contains Array contains value @(1,2,3) -contains 2$true
-in Value in array 2 -in @(1,2,3)$true
-and Logical AND ($true) -and ($true)$true
-or Logical OR ($true) -or ($false)$true
-not Logical NOT -not ($false)$true

Additional Resources