Skip to main content

Windows OS & PowerShell

Your JD asks for "Strong knowledge of Windows OS & Server Administration" and names PowerShell scripts. This is the module that closes the largest gap in your resume.

The troubleshooting toolkit​

Memorise this table. It is the core of day-to-day L1/L2 work.

CommandDoes
ipconfig /allEvery adapter, mask, gateway, DNS, DHCP server
ipconfig /release / /renewDrop and re-request a DHCP lease
ipconfig /flushdnsClear the DNS resolver cache
pingReachability and latency
tracertPath to a host
nslookupDNS resolution
netstat -anoConnections, listening ports, owning PID
tasklist / taskkillRunning processes
sc query / Get-ServiceService state
systeminfoOS version, boot time, patch level
wmic / Get-CimInstanceHardware and OS inventory
sfc /scannowRepair protected system files
DISM /Online /Cleanup-Image /RestoreHealthRepair a broken component store
gpupdate /forceRe-apply Group Policy
gpresult /rWhich policies applied, and why
w32tm /resyncForce time synchronisation
nltest /dsgetdc:domainCan this machine see a domain controller?
Time sync is not optional

Kerberos rejects authentication when the clock is skewed more than five minutes from the DC. "I can't log in but my password is right" is very often simply a wrong time.

PowerShell — the fundamentals​

PowerShell is a pipeline language and you support role will be judged on it.

# Verb-Noun is the convention, and interviewers listen for it.
Get-Service -Name Spooler
Start-Service -Name Spooler
Restart-Service -Name Spooler
Stop-Service -Name Spooler

# The pipeline
Get-Service | Where-Object {$_.Status -eq 'Running'} | Measure-Object

# Object selection and projection
Get-Process | Select-Object -First 5 Name, Id, CPU
Get-Service | Select-Object Name, @{n='State'; e={$_.Status}}

Things you will actually be asked to write​

# Events in the last hour — your first stop for "it crashed"
Get-WinEvent -FilterHashtable @{
LogName = 'System'
Level = 1,2 # 1 Critical, 2 Error
StartTime = (Get-Date).AddHours(-1)
} | Select-Object TimeCreated, Id, ProviderName, Message

# Disk health — a failing disk explains most "slow PC" tickets
Get-PhysicalDisk | Select-Object FriendlyName, HealthStatus, MediaType
Get-Volume | Select-Object DriveLetter, @{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,1)}}

# Patching state
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10

# Who is logged on to a machine
query user /server:PC-ENG-07
Get-CimInstance Win32_LogonUser | Where-Object {$_.LogonType -eq 2}
Event IDs worth memorising
IDSourceMeans
7DiskBad block found
51DiskPaging/IO error — often a dying disk
55NtfsFile system corruption
41Kernel-PowerUnexpected shutdown / power loss
6008EventLogUnexpected shutdown
7031/7034Service Control ManagerService crashed
1058Service Control ManagerService disabled

Services​

Get-Service | Where-Object {$_.Status -ne 'Running'} | Select-Object Name, Status, StartType

Common support services:

ServiceSymptoms when stopped
SpoolerNothing prints. Queue stuck.
wuauservWindows Update fails
DNS ClientName resolution fails
LanmanWorkstation / LanmanServerNetwork shares fail
WinDefendDefender does not scan
WSearchSearch indexer issues
Plug PlayUSB devices not detected
ThemesGUI glitches (often a symptom, not a cause)

Reading Event Viewer​

LogContains
SystemHardware, drivers, services, power
ApplicationApplication crashes, .NET errors
SecurityLogon events (4624 success, 4625 failure)
SetupWindows updates and installation
Power-TroubleshooterWhy the machine slept or shut down
Get-WinEvent -LogName Security -MaxEvents 50 |
Where-Object {$_.Id -eq 4625} | Select-Object TimeCreated, Message
Reliability Monitor

perfmon /rel shows hardware and software problems over time rather than a snapshot. When a user says "it keeps crashing", this is faster than the event log and tells you which component.

System repair, in order​

  1. sfc /scannow — repair protected files
  2. DISM /Online /Cleanup-Image /RestoreHealth — repair the component store
  3. sfc /scannow again — DISM often requires a second SFC pass
  4. In-place repair install — keeps data, replaces the OS
Rebuilding a profile, not the machine

For a corrupt user profile, create a new local admin and test there before you rebuild. If the machine works under a new profile, it is the profile — rename the old one and let Windows create a fresh one on next logon.

Boot and safe mode​

Shift+Restart → Troubleshoot → Advanced Options, or:

bcdedit /enum
ToolUse
Safe ModeThird-party drivers and services are the suspect
Last Known GoodThe system booted before a driver change
Startup RepairBoot volume won't load
System RestorePoint back to before the fault

Next​

Windows Server.

Was this page helpful?