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-CommandLists all installed cmdlets, functions, and aliases.
Get-MemberShows the properties and methods of an object.
Set-ExecutionPolicyChanges user preference for script execution safety.
Get-AliasReturns the aliases for cmdlets (e.g., 'ls' for Get-ChildItem).
Find-ModuleFinds software modules in the PowerShell Gallery.
Install-ModuleDownloads and installs a module from the gallery.
Import-ModuleLoads a module into the current session.
Update-HelpDownloads latest help files from the internet.
Get-HistoryLists the commands entered during the current session.
File & Item Management
Get-ChildItemGets items/folders in a directory (Alias: dir, ls).
New-Item -Path "C:\" -ItemType FileCreates a new file or directory.
Remove-ItemDeletes files or folders (Alias: rm, del).
Copy-ItemCopies items from one location to another.
Move-ItemMoves an item to a new location.
Set-ContentWrites or replaces content in a file.
Add-ContentAppends text to the end of a file.
Get-ContentReads the content of a file.
Test-PathReturns True/False if a path exists.
Compress-ArchiveCreates a zipped archive from files.
Expand-ArchiveExtracts files from a zipped folder.
Rename-ItemRenames an existing file or directory.
Networking & Connectivity
Test-NetConnection -Port 80Diagnostic tool for connection testing (Ping/Port).
Get-NetIPAddressRetrieves IP address configuration.
Resolve-DnsNamePerforms a DNS lookup for a host or IP.
Get-NetRouteDisplays the IP routing table.
New-NetFirewallRuleCreates a new Windows Firewall rule.
Invoke-WebRequestGets content from a webpage (Web Scraping/API).
Invoke-RestMethodSends HTTP requests to RESTful APIs (returns JSON).
Get-NetAdapterLists physical and virtual network adapters.
Processes & System Services
Get-ProcessLists all active processes.
Stop-Process -Name "Notepad"Terminates a running process.
Get-ServiceDisplays status of all system services.
Start-ServiceStarts a stopped service.
Restart-ServiceRestarts a service (useful for config updates).
Get-EventLog -LogName SystemReads the Windows event logs.
Get-HotFixLists installed Windows Updates.
Get-WmiObject -Class Win32_BIOSGets 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...]