PowerShell Reference

A growing library of PowerShell tools and patterns I've put together as a sysadmin. Public and open-source for anyone who wants to learn, copy, or contribute.

View on GitHub

đź§  PowerShell for Absolute Beginners

This guide covers the very basics of PowerShell—what it is, how to use it, and how to understand the core concepts before diving into scripting.


đź’ˇ What is PowerShell?

PowerShell is a command-line shell and scripting language built by Microsoft.
It lets you manage and automate nearly every part of Windows—and even works on Linux and macOS.

It’s:


📟 Opening PowerShell

To start PowerShell:

You’ll see a prompt that looks like:

PS C:\Users\YourName>

You’re now in the PowerShell environment.


🔹 Running Commands

PowerShell works by typing in commands (called cmdlets):

Get-Date

This shows the current date and time.

Get-Process

Shows all running processes.

Get-Service

Lists all system services.

Most cmdlets follow the Verb-Noun format:

Get-Item
Set-ExecutionPolicy
New-LocalUser

đź§Ş Try This

Type each of these into PowerShell and press Enter:

Get-Location      # Shows your current folder
Get-ChildItem     # Lists files/folders (like 'ls' or 'dir')
Clear-Host        # Clears the screen

đź§  Cmdlet Breakdown

Let’s break down one:

Get-ChildItem -Path C:\Windows -Recurse

This command lists every file in C:\Windows and its subfolders.


⚙️ Tab Completion

Type the first few letters of a command and hit Tab:

Get-Pro [Tab] → Get-Process

Same works for parameter names and paths:

Get-ChildItem -Pat [Tab]

📌 Summary

Feature Example
View time Get-Date
List files Get-ChildItem
Check folder Get-Location
Clear screen Clear-Host
View services Get-Service

âś… Next Steps

Once you’re comfortable running simple commands, you can move on to: