Table of Contents
- What is PowerShell?
- Command Prompt vs Windows PowerShell vs PowerShell Core
- Installing PowerShell
What is PowerShell?
PowerShell is a command-line shell and scripting language from Microsoft for Windows, Linux, and macOS. It helps automate tasks and manage systems.
- Command-line shell: Interactive command prompt with rich features
- Scripting language: Write scripts (.ps1) to automate tasks
- Object-oriented: Commands (cmdlets) return objects, not just text
- Cross-platform: Works on Windows, Linux, and macOS (PowerShell 7+)
- Built on .NET: Uses the .NET runtime for functionality
- Extensible: Supports modules, functions, and custom cmdlets
Command Prompt vs Windows PowerShell vs PowerShell Core
- Command Prompt (cmd.exe): Windows-only legacy shell with text-based output and batch scripting (.bat/.cmd), still available for compatibility but not actively developed.
- Windows PowerShell 5.1: Windows-only object-based shell preinstalled on Windows, uses .NET Framework and verb-noun cmdlets, strong Windows integration but in maintenance mode with no new features.
- PowerShell 7+ (PowerShell Core): Cross-platform(available in Windows, Linux, macOS) object-based shell built on .NET Core, actively developed with modern features, recommended for new automation projects and runs alongside Windows PowerShell 5.1.
Installing PowerShell
On Windows:
- Windows PowerShell 5.1 is preinstalled in Windows 10 and Windows 11. No installation needed, just search for “PowerShell” in Start Menu.
- Install PowerShell using WinGet (recommended)
#search for the latest version
winget search Microsoft.PowerShell
#Install PowerShell
winget install --id Microsoft.PowerShell --source winget
Leave a Reply