Microsoft Docs

Your hub for technical documentation

Getting Started with PowerShell

Welcome to the world of PowerShell! This guide will help you install, configure, and begin your journey with this powerful command-line shell and scripting language.

What is PowerShell?

PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and the accompanying scripting language built on the .NET Framework. It's designed for system administrators and power users to manage Windows, and increasingly, other operating systems like Linux and macOS.

Key Concepts

Installing PowerShell

PowerShell comes pre-installed with modern versions of Windows. However, you might want to install the latest version or PowerShell Core (which runs on Windows, macOS, and Linux).

For Windows 10 and later:

Open PowerShell (search for it in the Start menu) and run the following command to check your version:

$PSVersionTable.PSVersion

If you need to update, you can often do so through the Microsoft Store. Search for "PowerShell".

Installing PowerShell Core (Cross-Platform):

For the latest features and cross-platform support, install PowerShell 7.x:

  1. Visit the PowerShell releases page on GitHub.
  2. Download the appropriate installer for your operating system (Windows, macOS, or Linux).
  3. Follow the installation instructions for your platform.

After installation, you can launch PowerShell Core by typing pwsh in your terminal or command prompt.

Your First Commands

Let's run some basic commands to get familiar:

Using Help

PowerShell has extensive built-in help. To get help on any cmdlet, use Get-Help:

Get-Help Get-Process
Get-Help Get-Process -Examples
Get-Help Get-Process -Full

Next Steps

Now that you've got the basics, consider exploring:

Happy scripting!