ZSZainSpireLibrary
Cheat sheet · updated 13 Nov 2026

10 PowerShell commands for IT support

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.

Before you start Open the Start menu, type PowerShell. For commands 3 and 5 choose Run as Administrator. Everything here works in Windows PowerShell 5.1 (built into Windows) unless noted.

01Get-ComputerInfo

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.

02Get-Process

Get-Process | Sort-Object CPU -Descending | Select-Object -First 10

Running programs with their Id (process ID). The busiest ones first.

03Stop-Process

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.

04Get-Service

Get-Service | Where-Object Status -eq Running

Lists Windows services and whether each is Running or Stopped.

05Restart-Service

Restart-Service -Name Spooler -PassThru

Restarts a service (Spooler = printing). Needs PowerShell opened with Run as Administrator, otherwise you get "Cannot open Spooler service".

06Get-NetIPConfiguration

Get-NetIPConfiguration

Your IP address, default gateway and DNS servers per network adapter.

07Test-NetConnection

Test-NetConnection google.com -Port 443

Checks if a server port is reachable. TcpTestSucceeded : True means it is open.

08Get-EventLog / Get-WinEvent

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.

09Get-ChildItem

Get-ChildItem .\Downloads
ls .\Downloads

Files and folders inside a folder. dir and ls are aliases of the same command.

10Get-ExecutionPolicy

Get-ExecutionPolicy
Get-ExecutionPolicy -List

Why scripts are blocked. On Windows PCs the default is usually Restricted (servers: RemoteSigned).

+Fix "running scripts is disabled"

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.

Links PowerShell docs: learn.microsoft.com/powershell
About execution policies: about_Execution_Policies
PowerShell 7 changes (event log cmdlets): breaking changes