PowerShell Command Reference

For administrators and developers. Updated for 2026 workflows.

🔍

Core & Help Cmdlets

Get-Help [Command]
Displays help and syntax for a specific command.
Get-Command
Lists all installed cmdlets, functions, and aliases.
Get-Member
Shows the properties and methods of an object.
Set-ExecutionPolicy
Changes user preference for script execution safety.
Get-Alias
Returns the aliases for cmdlets (e.g., 'ls' for Get-ChildItem).
Find-Module
Finds software modules in the PowerShell Gallery.
Install-Module
Downloads and installs a module from the gallery.
Import-Module
Loads a module into the current session.
Update-Help
Downloads latest help files from the internet.
Get-History
Lists the commands entered during the current session.

File & Item Management

Get-ChildItem
Gets items/folders in a directory (Alias: dir, ls).
New-Item -Path "C:\" -ItemType File
Creates a new file or directory.
Remove-Item
Deletes files or folders (Alias: rm, del).
Copy-Item
Copies items from one location to another.
Move-Item
Moves an item to a new location.
Set-Content
Writes or replaces content in a file.
Add-Content
Appends text to the end of a file.
Get-Content
Reads the content of a file.
Test-Path
Returns True/False if a path exists.
Compress-Archive
Creates a zipped archive from files.
Expand-Archive
Extracts files from a zipped folder.
Rename-Item
Renames an existing file or directory.

Networking & Connectivity

Test-NetConnection -Port 80
Diagnostic tool for connection testing (Ping/Port).
Get-NetIPAddress
Retrieves IP address configuration.
Resolve-DnsName
Performs a DNS lookup for a host or IP.
Get-NetRoute
Displays the IP routing table.
New-NetFirewallRule
Creates a new Windows Firewall rule.
Invoke-WebRequest
Gets content from a webpage (Web Scraping/API).
Invoke-RestMethod
Sends HTTP requests to RESTful APIs (returns JSON).
Get-NetAdapter
Lists physical and virtual network adapters.

Processes & System Services

Get-Process
Lists all active processes.
Stop-Process -Name "Notepad"
Terminates a running process.
Get-Service
Displays status of all system services.
Start-Service
Starts a stopped service.
Restart-Service
Restarts a service (useful for config updates).
Get-EventLog -LogName System
Reads the Windows event logs.
Get-HotFix
Lists installed Windows Updates.
Get-WmiObject -Class Win32_BIOS
Gets BIOS and hardware information.

Top 26 Essential Scripts

1. Bulk File Rename (Add Prefix)
Get-ChildItem *.jpg | Rename-Item -NewName { "2026_" + $_.Name }
2. Export Running Services to CSV
Get-Service | Where-Object {$_.Status -eq "Running"} | Export-Csv -Path "C:\Logs\RunningServices.csv"
3. Test Web Server Availability
if (Test-Connection -ComputerName "google.com" -Quiet) { Write-Host "Online" } else { Write-Host "Offline" }
4. Get Largest 10 Files on Drive
Get-ChildItem C:\ -Recurse -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select-Object -First 10 Name, @{Name="Size(MB)";Expression={$_.Length / 1MB}}
5. Check if User is Admin
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()); $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
6. List All Local Users
Get-LocalUser | Select-Object Name, Enabled, LastLogon
7. Find Expired Certificates
Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object { $_.NotAfter -lt (Get-Date) }
8. Monitor Process CPU Usage (Top 5)
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 ProcessName, CPU
9. Send Email via Gmail SMTP
Send-MailMessage -From "you@gmail.com" -To "them@gmail.com" -Subject "Alert" -SmtpServer "smtp.gmail.com" -Port 587 -UseSsl
10. Backup Folder to Zip with Date
$date = Get-Date -Format "yyyyMMdd"; Compress-Archive -Path "C:\Data" -DestinationPath "D:\Backups\Data_$date.zip"

[+16 more advanced scripts including AD User Creation, Azure VM resizing, and JSON API parsing...]