Search the documentation..
Get Started with Powershell
There are multiple ways to install PowerShell in Windows. Each install method is designed to support different scenarios and workflows. View all the install or update options on Microsoft PowerShell on Windows or check out the official product documentation for PowerShell on learn.microsoft.com/en-us/powershell
Install Windows Powershell
PowerShell 7: PowerShell 7 is the latest cross-platform version of PowerShell. It can be installed on Windows, macOS, and Linux.
- Open the PowerShell website: https://github.com/PowerShell/PowerShell/releases/
- Scroll down to the “Assets” section of the latest release and download the installer package for Windows (usually an MSI file).
- Run the installer and follow the on-screen instructions.
Windows PowerShell (Built-in on most Windows versions):
Windows PowerShell is already installed on most Windows versions. To open it, search for “PowerShell” in the Start menu.
Update Powershell
Check Version
Get-Host
Search for PowerShell Versions
winget search Microsoft.PowerShell
Update PowerShell
winget install –id Microsoft.Powershell –source winget
winget install –id Microsoft.Powershell.Preview –source winget

About PowerShell
PowerShell is a powerful scripting and automation framework developed by Microsoft for managing and automating tasks on Windows systems. It provides a command-line interface (CLI) as well as a scripting language.
Here are the basic steps to get started with PowerShell:
- Opening PowerShell:
- Windows Search: Type “PowerShell” in the Windows search bar and select “Windows PowerShell” or “Windows PowerShell (ISE)” from the results.
- Start Menu: Navigate to the Start Menu, expand the “Windows PowerShell” folder, and select “Windows PowerShell” or “Windows PowerShell (ISE).”
- PowerShell Modes:
- Console Mode (PowerShell): This is the basic command-line interface.
- Integrated Scripting Environment (ISE): This provides a more feature-rich scripting environment with script editor and debugger.
- Running Commands:
- In the PowerShell window, you can start typing commands.
- Commands follow a verb-noun syntax, like
Get-Process,Set-Location,New-Item, etc. - Press
Enterto execute the command.
- Getting Help:
- Use the
Get-Helpcmdlet to get help about commands. For example:Get-Help Get-Process.
- Use the
- Variables:
- You can create variables by using the
$symbol, like$variableName = "Hello, PowerShell!". - Variables can store different types of data, such as strings, numbers, arrays, and objects.
- You can create variables by using the
- Basic Commands:
Get-Process: Lists running processes.Get-ChildItem: Lists files and folders in the current directory.Set-Locationorcd: Changes the current directory.New-Item: Creates a new file, directory, or other item.Remove-Item: Deletes a file or directory.
- Pipelines:
- PowerShell supports piping, where the output of one command can be used as the input of another.
- For example, you can use
Get-Process | Where-Object { $_.WorkingSet -gt 100MB }to list processes using more than 100MB of memory.
- Scripting:
- You can create and run PowerShell scripts by saving commands in a
.ps1file. - Make sure to set the execution policy using
Set-ExecutionPolicyif you encounter script execution issues.
- You can create and run PowerShell scripts by saving commands in a
- Modules:
- PowerShell modules are collections of cmdlets, functions, and scripts that extend its functionality.
- You can use
Import-Moduleto load a module and gain access to its commands.
- Getting Advanced:
- PowerShell supports advanced scripting, including loops, conditional statements, functions, and more.
- You can integrate PowerShell with other technologies like .NET and REST APIs.
Remember that PowerShell can interact with the file system, the Windows Registry, services, processes, and more, making it a powerful tool for managing and automating various tasks on Windows systems. As you become more comfortable, you can explore more advanced features and capabilities of PowerShell.