# PowerShell

> A shell and script language that passes data with named parts, not plain text.

**Field:** Software Development  
**Category:** Languages  
**Also known as:** Windows PowerShell, PowerShell Script, pwsh, .ps1 File

## Think of it like

Most shells hand you loose notes. This one hands you boxes with tags on them.

## Definition

PowerShell is a shell and scripting language for automating computer jobs. Most shells pass plain text from one command to the next. PowerShell passes whole objects, with named parts, so you do not have to cut text up. It runs on Windows, Linux and macOS. It is widely used to manage Windows machines and cloud services.

## Example

Microsoft makes PowerShell. An admin uses one line of it to list the three programs using the most CPU. Each result has named parts, like Name and CPU.

## Example code

```powershell
Get-Process | Sort-Object CPU -Descending | Select-Object -First 3
```

Get every program, sort by CPU use, and keep the top three.

## Why it matters

Most Windows and Azure admin work is done in it. Objects make long chains of commands safer.

## Common mistake

Running a script downloaded from the web without reading it. Scripts can change anything the user can.

## Three principles

- **Objects, not text.** Results have named parts.
- **Verb-Noun names.** Like Get-Process.
- **Runs everywhere.** Windows, Linux and macOS.

## Related terms

- [Shell Script](https://learn.benibix.com/term/development/shell-script)
- [Shell](https://learn.benibix.com/term/infrastructure/shell)
- [Scripting Language](https://learn.benibix.com/term/development/scripting-language)
- [C#](https://learn.benibix.com/term/development/c-sharp)

## Told apart from

- [Shell Script vs PowerShell](https://learn.benibix.com/compare/shell-script-vs-powershell): People think PowerShell is just the Windows version of a Bash shell script, and it is not. Both run commands one after another from a file. A Bash command hands the next one plain text, which has to be picked apart. A PowerShell command hands over objects with named parts, such as a file's name and size. PowerShell now runs on macOS and Linux too.

## Taught in

- [Shell Scripts, Perl and Lua](https://learn.benibix.com/learn/development-languages/shell-scripts-perl-and-lua): Programming Languages, 12/12

![Four labelled shelves of languages. Data science: R, MATLAB and Julia, beside a small bar chart. Functional: Haskell, Scala, Elixir, beside an arrow that turns a list into a new list. Shell and scripting: shell script, PowerShell, Perl and Lua, beside a terminal prompt. Close to the hardware: assembly language and Objective-C, beside a chip and a phone.](https://learn.benibix.com/diagrams/dev4-language-families.svg)

---

Source: https://learn.benibix.com/term/development/powershell
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
