PowerShell Genie

What is PowerShell?

PowerShell is a shell and a scripting language built around objects. When you run a command, what comes back is not a block of text but a structured thing with named properties you can ask about — the asking is done with Get-Member, which lists every property and method on whatever comes back.

Lesson 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

In plain English

There are two PowerShells in the world. Windows PowerShell 5.1 ships with Windows and stops receiving new features. PowerShell 7 is the current cross-platform version and installs alongside 5.1 rather than replacing it. Both are in wide use, so you will meet both.

You do not need to memorise commands. Command names follow a strict Verb-Noun pattern. These built-in Verb-Noun commands are called cmdlets (pronounced "command-lets") — the word you will see everywhere from here on. Two cmdlets in particular, Get-Help and Get-Command, let you find anything else. Learning those two well is worth more than learning fifty command names.

What happens

Get-Process asks Windows for the list of running processes and returns one object per process. The table you see is only a default view: PowerShell picked a few of the many properties each process object carries and formatted them into columns. The objects themselves hold far more, including CPU time, memory figures, the executable path and the process owner.

Worth remembering

  • Commands return objects with properties, not lines of text.
  • Command names are Verb-Noun, which makes them guessable.
  • Windows PowerShell 5.1 and PowerShell 7 both exist and both matter.
  • Get-Help and Get-Command will find anything you have forgotten.

Primary documentation

Get-Process reference

Try it

Browser simulation · fictional data; no changes to your computer.

Interactive simulation · fictional data

Returns one object per running process, displayed in a default table view.

Show reference output

Sample output · fictional data, shaped like the real thing

Name     ProcessName  Id     CPU     WS         WorkingSet  WorkingSet64
-------  -----------  -----  ------  ---------  ----------  ------------
chrome   chrome       9184   842.31  486539264  486539264   486539264   
notepad  notepad      3200   0.4     12582912   12582912    12582912    
pwsh     pwsh         11268  18.27   78643200   78643200    78643200    
spoolsv  spoolsv      4400   1.4     33554432   33554432    33554432    
MsMpEng  MsMpEng      2600   950     220200960  220200960   220200960   

Keep going

Next: Installing PowerShell
Genie guideWhat is PowerShell?

PowerShell is a shell and a scripting language built around objects. When you run a command, what comes back is not a block of text but a structured thing with named properties you can ask about — the asking is done with Get-Member, which lists every property and method on whatever comes back.