What is PowerShell and Why Should You Care?

If you manage Windows computers, servers, or Microsoft 365, PowerShell is the most powerful tool you’re probably not using. It’s built into every modern Windows installation, it’s free, and it can automate tasks that would otherwise take hours of manual work. Here’s what it is and why it matters.

What PowerShell Is

PowerShell is a command-line shell and scripting language developed by Microsoft. It was first released in 2006 as a replacement for the older Command Prompt, and has evolved significantly since then.

Where the Command Prompt deals primarily with text output, PowerShell works with objects: structured data that can be filtered, sorted, and passed between commands. This makes it significantly more powerful for administration tasks.

PowerShell is now open source and cross-platform. Windows PowerShell (version 5.1) is built into Windows and won’t be updated further. PowerShell 7 is the current cross-platform version, available as a separate install, and is the version to use for new scripts. Both are relevant in most Windows environments today.

What PowerShell Can Do

The short answer is: almost anything you can do through a GUI in Windows, and many things you can’t.

User and group management. Create, modify, and disable Active Directory accounts. Add users to groups. Generate reports on account activity. Tasks that take minutes per user in the GUI take seconds in a script.

Microsoft 365 administration. Manage users, licences, mailboxes, and Teams settings across your entire organisation from the command line. The Microsoft 365 PowerShell modules give you access to capabilities that aren’t exposed in the admin portal at all.

System administration. Check disk space, manage services, install software, configure Windows features, query event logs, and restart machines remotely, all without sitting in front of them.

Automation and scheduling. Combine commands into scripts that run on a schedule. A script that checks disk space across all servers and emails a report if any drive is low takes minutes to write and runs indefinitely without further attention.

Network diagnostics. Test connectivity, resolve DNS names, check open ports, and trace routes, all from the PowerShell console.

Reporting. Extract data from Active Directory, Microsoft 365, or local systems and export it to CSV or formatted reports. Useful for audits, compliance checks, and management reporting.

PowerShell vs Command Prompt

The Command Prompt (cmd.exe) is the older Windows command-line tool. It’s still present in Windows and useful for simple tasks, but it has significant limitations:

  • Output is plain text, not structured objects
  • Limited scripting capability
  • No access to modern Windows APIs or cloud services
  • Not cross-platform

PowerShell supersedes the Command Prompt for any serious administration work. If you’re learning command-line tools for Windows administration, start with PowerShell rather than the Command Prompt.

The PowerShell Verb-Noun Convention

PowerShell commands are called cmdlets (pronounced “command-lets”) and follow a consistent Verb-Noun naming pattern. This makes them predictable:

  • Get-Process lists running processes
  • Stop-Process stops a process
  • Get-Service lists Windows services
  • Set-Service modifies a service
  • Get-ADUser retrieves Active Directory user information
  • New-ADUser creates a new Active Directory user

Once you understand the pattern, you can often guess the right command for a new task. And if you can’t, Get-Command lists every available cmdlet, and Get-Help provides documentation for any of them.

Getting Started

PowerShell is already on your Windows machine. Press Win+X and select Windows PowerShell or Terminal (Windows 10 and 11). For writing and testing scripts, Visual Studio Code with the PowerShell extension is the recommended editor and is free.

A few commands to try immediately:

powershell

Get-Date                          # Current date and time
Get-Process                       # Running processes
Get-Service | Where-Object {$_.Status -eq "Running"}   # Running services
Get-Disk                          # Disk information

PowerShell 5.1 vs PowerShell 7

Most Windows environments currently run scripts on Windows PowerShell 5.1, which is built in and doesn’t require installation. PowerShell 7 is the modern, cross-platform version with improved performance and new features.

For most SMB administration tasks, either version works. New scripts are best written targeting PowerShell 7 where possible. Some older modules (particularly certain Active Directory tools) require Windows PowerShell 5.1 specifically.

Scroll to Top