Guide · Open source
How to use PowerShell: install, run commands and automate tasks
Updated · written with AI from the project's own documentation and checked against our catalogue data
PowerShell is a cross-platform automation and configuration tool that includes a command-line shell, a scripting language, and a framework for processing cmdlets. It runs on Windows, Linux and macOS and is designed to work with structured data such as JSON, CSV and XML, as well as REST APIs and object models. This guide explains what it is good for, how to get the source, where to find install instructions, and what to expect when you start using it.
Quick start
- 1Decide on the version. Use PowerShell 7 or higher if you want the cross-platform version. Use Windows PowerShell 5.1 only if you need its specific features.
- 2Install using your platform's method. Follow Microsoft's installation guide for Windows, macOS or your Linux distribution, and use the same method for future upgrades.
- 3Read the getting started docs. Start with the getting started documentation on Microsoft Learn to learn the shell and scripting language.
- 4Clone the source if needed. Run git clone https://github.com/PowerShell/PowerShell.git to get the source code for building or study.
- 5Work with structured data. Use PowerShell to process JSON, CSV, XML or REST API responses as structured data instead of plain text.
- 6Ask for help. Use GitHub Discussions for general questions and the issue tracker for actionable bugs in PowerShell 7+.
What PowerShell is and who it suits
PowerShell is a shell, a scripting language and an automation framework in one. Unlike shells that mostly pass plain text between tools, it is built to handle structured data, so you can work with JSON, CSV, XML, REST APIs and object models from the command line.
- Developers who script or automate tasks across Windows, Linux and macOS
- Administrators who work with JSON, CSV, XML or REST APIs from the command line
- People moving from Windows PowerShell 5.1 who want the newer cross-platform version (PowerShell 7 and higher)
Choose the right version: PowerShell 7+ or Windows PowerShell 5.1
This repository started as a fork of the Windows PowerShell codebase, but changes made here are not ported back to Windows PowerShell 5.1. Issues tracked in this repository only cover PowerShell 7.x and higher.
If you specifically need Windows PowerShell 5.1 features, this project is not the right place for them. Windows PowerShell specific issues should be reported through the Feedback Hub app, choosing "Apps > PowerShell" as the category.
Install PowerShell on Windows, Linux or macOS
PowerShell is supported on Windows, macOS and a variety of Linux platforms. The project points to Microsoft's installation documentation for platform-specific steps, which is the authoritative place to start. The source does not list any prerequisites.
If you upgrade later, use the same install method you used the first time. The update method differs by platform and install method.
Get the source code if you want to build or read it
If you want the source rather than a packaged install, clone the repository with the command below. The README points to separate build instructions for Linux, Windows and macOS in the docs/building folder.
git clone https://github.com/PowerShell/PowerShell.gitLearn the basics and get help
If you are new to PowerShell, the README recommends reviewing the getting started documentation on Microsoft Learn. For questions that are not about code, the project hosts GitHub Discussions. Issues are for actionable problems that the team or community can fix.
Community chat is available on Discord, IRC (Libera.Chat) and Slack. For security concerns, use the project's Security Policy rather than a public issue.
- Getting started documentation: Microsoft Learn PowerShell learning path
- Discussions: github.com/PowerShell/PowerShell/discussions
- Chat: Discord, IRC on Libera.Chat, Slack
Compare PowerShell with other shells
Comparable projects include Bash, Zsh, Nushell and Fish. PowerShell's distinguishing feature, according to the README, is its focus on structured data and objects rather than plain text. Choose the shell that matches the tools and scripts you already use.
What people use it for
- Automating repetitive administration tasks on Windows, Linux or macOS machines
- Parsing and transforming JSON, CSV or XML files from the command line
- Calling REST APIs and working with the returned objects
- Managing system configuration through scripts
Frequently asked questions
Is PowerShell free to use?
PowerShell is licensed under the MIT license, as stated in the README. The MIT license is a permissive open-source license, so you can read the terms in the LICENSE.txt file in the repository.
Does PowerShell run on Linux and macOS?
Yes. The README describes PowerShell as cross-platform and says it is supported on Windows, macOS and a variety of Linux platforms. Installation details are in Microsoft's installing PowerShell documentation.
What is the difference between PowerShell and Windows PowerShell 5.1?
This repository covers PowerShell 7.x and higher. The README says changes here are not ported back to Windows PowerShell 5.1, which started as a fork of the same codebase.
What do I need installed before I install PowerShell?
The source does not list any prerequisites. Check Microsoft's installation documentation for your platform before you start.
How do I get the PowerShell source code?
Run git clone https://github.com/PowerShell/PowerShell.git. The README points to build instructions for Linux, Windows and macOS in the docs folder.
Is PowerShell better than Bash?
It depends on the job. PowerShell is designed around structured data such as JSON, CSV and XML and object models, while Bash is text-oriented. The README does not make a direct comparison, so try both on your own tasks.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
PowerShell suits developers and administrators who script across Windows, Linux and macOS or work with JSON, CSV, XML and REST APIs. It is less suitable if you only need Windows PowerShell 5.1 features, or if you want a minimal, lightweight shell, since the README describes it as a full automation framework with more to learn.
Install options & downloads