The everyday PowerShell commands for checking a PC, fixing a frozen app or a stuck printer, testing the network and reading logs. Each one has a copy-ready example and the catch most tutorials skip.
Get-ComputerInfo | Select-Object OsName, OsVersion, CsModel, CsTotalPhysicalMemory
Windows version, model, RAM and more. RAM is shown in bytes (17007525888 ≈ 16 GB). Can take a few seconds.
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
Running programs with their Id (process ID). The busiest ones first.
Stop-Process -Id 1234 -Force
Stop-Process -Name notepad
Ends a frozen app. Get the Id from Get-Process. Unsaved work in that app is lost.
Get-Service | Where-Object Status -eq Running
Lists Windows services and whether each is Running or Stopped.
Restart-Service -Name Spooler -PassThru
Restarts a service (Spooler = printing). Needs PowerShell opened with Run as Administrator, otherwise you get "Cannot open Spooler service".
Get-NetIPConfiguration
Your IP address, default gateway and DNS servers per network adapter.
Test-NetConnection google.com -Port 443
Checks if a server port is reachable. TcpTestSucceeded : True means it is open.
Get-EventLog -LogName System -Newest 10
Get-WinEvent -LogName System -MaxEvents 10
Windows event logs for troubleshooting. Get-EventLog works only in Windows PowerShell 5.1; it was removed from PowerShell 7, so use Get-WinEvent there.
Get-ChildItem .\Downloads
ls .\Downloads
Files and folders inside a folder. dir and ls are aliases of the same command.
Get-ExecutionPolicy
Get-ExecutionPolicy -List
Why scripts are blocked. On Windows PCs the default is usually Restricted (servers: RemoteSigned).
If a script fails with "cannot be loaded because running scripts is disabled on this system", allow scripts for your own user only:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
RemoteSigned runs your own local scripts but blocks unsigned scripts downloaded from the internet. Only run scripts you trust: execution policy is a safety net, not a security wall.