Skip to main content
  1. Blog/

PowerShell Basics #1: Setting Up Your Environment

Table of Contents
PowerShell Basics - This article is part of a series.
Part 1: This Article

TL;DR

  • PowerShell is a cross-platform, object-oriented shell & scripting language for Windows, Linux, and macOS.
  • Install PowerShell 7+ Core via Winget alongside Windows Terminal for the optimal command-line experience.
  • Understand the difference between legacy Windows PowerShell 5.1 and modern cross-platform PowerShell 7+.

PowerShell is a command-line shell and scripting language from Microsoft for Windows, Linux, and macOS. It helps automate administrative tasks and manage infrastructure cleanly.

  • Command-line shell: Interactive prompt with tab completion & predictive IntelliSense
  • Scripting language: Write complete, reusable scripts (.ps1) to automate complex workflows
  • Object-oriented: Commands (cmdlets) pass rich .NET objects through the pipeline, not raw text strings
  • Cross-platform: Runs on Windows, Linux, and macOS (PowerShell 7+)

Windows PowerShell 5.1 vs. PowerShell 7+
#

FeatureWindows PowerShell 5.1PowerShell 7+ (Core)
Underlying Engine.NET Framework (Windows only).NET 8+ (Cross-platform)
Supported OSWindows 7 / 10 / 11 / ServerWindows, Linux, macOS
PerformanceStandardHigh performance & parallel pipeline (ForEach-Object -Parallel)
Executable Namepowershell.exepwsh.exe

Note: Windows PowerShell 5.1 comes built into Windows and will remain for backward compatibility. Modern automation should target PowerShell 7+ (pwsh.exe).

Installing PowerShell 7+ & Windows Terminal
#

Step 1: Install PowerShell 7 via Winget
#

Open Command Prompt or Windows PowerShell and run:

winget install --id Microsoft.PowerShell --source winget

Step 2: Install Windows Terminal
#

Windows Terminal provides tabbed sessions, custom HSL color schemes, and GPU-accelerated text rendering:

winget install --id Microsoft.WindowsTerminal --source winget

Step 3: Verify Version
#

Launch Windows Terminal, open a new PowerShell tab, and check $PSVersionTable:

System.Collections.Hashtable

Expected output:

Name                           Value
----                           -----
PSVersion                      7.4.x
PSEdition                      Core
OS                             Microsoft Windows 10.0.22631

Wrapping Up
#

Concept / ToolPurposeCommand / Path
PowerShell 7+Modern cross-platform shell enginepwsh.exe
WingetWindows Package Manager for automated setupwinget install Microsoft.PowerShell
Windows TerminalModern host application for command-line toolswinget install Microsoft.WindowsTerminal
System.Collections.HashtableAutomatic variable checking PowerShell edition & version$PSVersionTable.PSVersion
PowerShell Basics - This article is part of a series.
Part 1: This Article