BeginnerLesson 3 of 16

Windows Administration Tools

Task Manager, Event Viewer, Performance Monitor, Disk Management — the essential GUI and CLI tools every Windows IIS administrator uses daily for monitoring, diagnosis, and capacity management.

🧒 Simple Explanation (ELI5)

Windows administration tools are like the dashboard in your car. Task Manager is the speedometer — it shows how fast things are going right now. Event Viewer is the black-box recorder — it tells you exactly what went wrong and when. Performance Monitor is like the car's diagnostics port — you plug in and see every sensor reading in detail. Disk Management is like looking at a map of your hard drives to see how space is divided up.

🔧 Why Do We Need It?

🌍 Real-world Analogy

Imagine you are the building manager for a hospital. Task Manager is your live CCTV screen showing real-time activity. Event Viewer is the security incident log on your desk — it tells you every alarm that fired and when. Performance Monitor is the environmental control panel showing temperature, humidity, and power by room. Disk Management is the blueprint showing which floors are full and which have space. You need all four to manage your building properly.

🖥️ Windows Server Basics Add-on

Windows Server administration also relies on Server Manager for role/feature lifecycle operations. Use Add Roles and Features to install components like Web Server (IIS), DNS, and AD DS. This is also where you manage remote servers in one console (multi-server manager). In mixed estates, distinguish physical servers (bare metal) from virtual servers (Hyper-V/VMware guests) because patch windows, storage paths, and performance troubleshooting differ by host type. Hyper-V basics matter because many IIS nodes run as VMs and depend on host resource allocation for CPU and memory stability.

⚙️ Technical Explanation

Task Manager (taskmgr.exe) provides real-time monitoring of processes, CPU, memory, disk, and network. In Windows Server 2012+, the Processes tab shows grouped views; the Details tab shows all individual processes with PID, status, username, CPU, and memory. The Performance tab shows CPU topology, memory usage (in use vs. available vs. cached), disk I/O rates, and network throughput. The Users tab helps identify interactive admin sessions on a terminal server.

Event Viewer (eventvwr.msc) is the central log management console. The Windows Logs section contains: Application (app-generated events), Security (audit events — logon success/failure, object access), Setup (OS installation/update), System (kernel and driver events — service stop/start, hardware errors), and Forwarded Events (collected from remote machines). Each log entry has a Level (Information, Warning, Error, Critical), Source (the component that logged it), Event ID (the numeric code identifying the event type), and message. The most important IIS-related event sources are: IIS-W3SVC, WAS, HttpEvent, MSSQL (if integrated), and Application Error.

Performance Monitor (perfmon.exe) records Windows performance counters. Counters are organised into Objects (e.g., Processor, Memory, PhysicalDisk, Web Service). Each counter tracks a specific metric — "% Processor Time", "Available Mbytes", "Requests/sec". You can log counter data over time into a Data Collector Set for trend analysis. Key IIS counters: Web Service → Current Connections, Total Bytes Sent, Requests/sec; ASP.NET → Request Execution Time, Request Wait Time; Process(w3wp) → Private Bytes, Thread Count.

⚠️
Event Viewer — IIS Critical Event IDs to Memorise

IIS 7+ logs to the Application Log under source "IIS-W3SVC" and "WAS". Critical IDs: 1000 = Application crash (check faulting module and exception code). 5005 = WAS failed to start a worker process (permission or .NET registration issue). 5010 = App pool disabled after max failure count. 5011 = Service unavailable (503). 5021 = App pool identity access denied. System log event 7034 = Service terminated unexpectedly. These IDs are asked in nearly every Windows/IIS support interview.

📊 Visual Representation

Windows Administration Toolset for IIS
Real-time Monitoring
Task Manager (taskmgr)
→ Processes, CPU, Memory, Disk, Network
Resource Monitor (resmon)
→ Per-process network/disk breakdown
Log Analysis
Event Viewer (eventvwr)
→ System, Application, Security logs
IIS Logs (C:\inetpub\logs)
→ W3C Extended format, per-site
Historical Metrics
Performance Monitor (perfmon)
→ Counters + Data Collector Sets
Reliability Monitor
→ Stability timeline with event correlation
Storage
Disk Management (diskmgmt)
→ Partitions, volumes, drive letters
Storage Spaces / ReFS
→ Enterprise storage pools

⌨️ Commands / Syntax

cmd / PowerShell
# --- Event Viewer from command line ---
# View last 20 System log errors
wevtutil qe System /c:20 /rd:true /f:text | findstr /i "error critical"

# View IIS-related Application log events (last 50)
wevtutil qe Application /c:50 /rd:true /f:text | findstr /i "IIS W3SVC WAS"

# Export System log to XML for analysis
wevtutil epl System C:\logs\system_export.evtx

# PowerShell: query event log for IIS errors
Get-EventLog -LogName Application -Source "*IIS*" -EntryType Error -Newest 20 |
  Select-Object TimeGenerated, EventID, Message | Format-List

# PowerShell: query specific event ID (5010 = app pool disabled)
Get-WinEvent -FilterHashtable @{LogName='Application'; Id=5010} -MaxEvents 10

# --- Performance Monitor from PowerShell ---
# Check CPU usage right now
(Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue

# Check available memory (MB)
(Get-Counter '\Memory\Available MBytes').CounterSamples.CookedValue

# Check IIS requests/sec
(Get-Counter '\Web Service(_Total)\Total Method Requests/sec').CounterSamples.CookedValue

# --- Disk ---
# Check disk free space on all drives
Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{N='Free(GB)';E={[math]::Round($_.Free/1GB,2)}}, @{N='Used(GB)';E={[math]::Round($_.Used/1GB,2)}}

# Check disk I/O
(Get-Counter '\PhysicalDisk(_Total)\Disk Bytes/sec').CounterSamples.CookedValue

💼 Example (Real-world Use Case)

An IIS server shows intermittent 502 errors. The on-call engineer opens Event Viewer → Application log and filters by source "IIS-W3SVC". Event 5010 appears multiple times in the last hour: "A process serving application pool 'api-prod' suffered a fatal communication error with the Windows Process Activation Service. The process id was '####'. The data field contains the error number." The engineer then opens Task Manager → Performance to confirm available memory — 200 MB remaining out of 16 GB, and working set of w3wp.exe was 14 GB. Root cause: memory leak causing out-of-memory crash of the worker process, which triggers app pool recycling (the 502 windows). Resolution: set Maximum Private Memory on the pool to 8 GB to trigger scheduled recycling before OOM crash, and escalate memory leak to developers.

🧪 Hands-on

  1. Open Task Manager, navigate to the Performance tab. Record: current CPU %, total RAM, available RAM, and disk read/write rates. Switch to Details tab and sort by Memory — identify the top 5 memory consumers.
  2. Open Event Viewer. Navigate to Windows Logs → System. Click "Filter Current Log" and filter for Error and Critical. Review the last 10 errors — identify the Event ID, Source, and message for each.
  3. Open Event Viewer → Windows Logs → Application. Search for any entries with source "IIS-W3SVC" or "WAS". If IIS is installed, you should see informational startup entries confirming the service started.
  4. Open Performance Monitor (Win+R → perfmon). Click the green + button to add counters. Add: Processor → % Processor Time → _Total. Memory → Available MBytes. PhysicalDisk → % Disk Time → _Total. Observe 60 seconds of data.
  5. Open PowerShell as Administrator and run the disk free space command from the commands section above. Confirm the system drive (C:) has adequate free space — IIS logging and temp files require headroom; 15% free as a minimum is a common baseline.
💡
Reliability Monitor — The Underused Gem

Open Reliability Monitor via Control Panel → Security and Maintenance → View reliability history. It shows a stability score (1-10) over time with a timeline of all software installs, updates, application crashes, and Windows failures. This is invaluable for immediately correlating "the site started failing after the update on Tuesday" — it visually shows exactly which update was installed when, and which crashes followed. Most junior engineers don't know this tool exists; knowing it makes you stand out in support interviews.

🐛 Debugging Scenario

Failure: An IIS server is performing slowly. Users report pages taking 10+ seconds. You need to identify the bottleneck in under 5 minutes without any pre-installed monitoring tools.

🎯 Interview Questions

Beginner

What is the difference between Task Manager and Resource Monitor?

Task Manager provides a high-level, real-time overview of system resource utilisation — processes, CPU, memory, disk, network, and GPU. Resource Monitor (resmon.exe) goes deeper: it shows per-process CPU usage with individual thread details, per-process disk I/O with file paths being read/written, per-process network activity with endpoint addresses, and per-process memory with Working Set breakdown. For IIS troubleshooting: Task Manager identifies which w3wp.exe is the problem; Resource Monitor tells you exactly which files it is reading/writing and which network connections it has open.

What are the main Windows event log types?

The five Windows Logs are: Application — events logged by applications and services (IIS, SQL, custom apps). Security — audit events including logon/logout, object access, privilege use, and account management. Setup — events related to OS and component installation. System — events from Windows OS components — kernel, drivers, services start/stop. Forwarded Events — events collected from remote machines using Windows Event Forwarding (WEF). Applications and Services Logs (under the root) are application-specific channel logs — for example Microsoft/Windows/Security-SPP or Microsoft-Windows-IIS-W3SVC.

How do you check disk space from the command line quickly?

Multiple options: dir C:\ shows free space at the bottom for the C drive. fsutil volume diskfree C: shows bytes available, bytes free, and total bytes. PowerShell: Get-PSDrive C | Select-Object Used, Free. WMIC: wmic logicaldisk get name,freespace,size lists all drives with sizes in bytes. For a more readable report: Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{N='Free(GB)';E={[math]::Round($_.Free/1GB,2)}}. Disk space checks should be part of every IIS incident investigation because full disks silently break logging and cause obscure 500 errors.

What is a Windows Performance Counter?

Performance counters are named metrics exposed by the Windows operating system and applications that measure specific aspects of system or application behaviour over time. They are organised into: Object (the component, e.g., Processor, Memory, Web Service), Counter (the specific metric, e.g., % Processor Time), and Instance (the specific item, e.g., core 0, a specific website). Applications register custom counter sets in the registry. IIS registers the "Web Service" object with counters for requests, bytes, errors, etc. Performance Monitor, PowerShell Get-Counter, and monitoring tools like SCOM, Datadog, and Prometheus Windows Exporter all use these counters.

What is Disk Management and what can you do with it?

Disk Management (diskmgmt.msc) is the GUI tool for managing disk partitions and volumes. With it you can: initialise new disks (MBR or GPT partition table), create, delete, extend, and shrink partitions and volumes, change drive letters and volume labels, convert basic disks to dynamic disks, bring disks online or offline, and view disk status (online/offline/missing). For IIS environments, Disk Management is used when adding storage for log volumes, extending the C drive after a VM disk expansion, or verifying that a new SAN LUN has been correctly assigned a drive letter before configuring IIS log paths.

Intermediate

How do you create a Data Collector Set in Performance Monitor to baseline IIS performance?

Open perfmon → Data Collector Sets → User Defined → right-click → New → Data Collector Set. Name it (e.g., "IIS Baseline"), choose "Create manually". Add performance counters (Counter data): Processor\% Processor Time, Memory\Available MBytes, PhysicalDisk\Disk Bytes/sec, Web Service(_Total)\Requests/sec, Process(w3wp)\Private Bytes, ASP.NET\Request Execution Time. Set sample interval (e.g., 15 seconds). Configure the output directory (e.g., D:\PerfLogs\IIS). Set a schedule (e.g., run during business hours). Start the DCS before a peak load period, stop it after, and view the report in Performance Monitor's Report section. This baseline establishes normal ranges for future anomaly detection.

Explain Windows Event Forwarding and when you'd use it for IIS environments.

Windows Event Forwarding (WEF) allows events from multiple source computers to be collected centrally on a collector computer. Source computers push events using the WinRM protocol (or use subscription pull). For IIS: in a farm of 10 web servers, you'd configure all servers to forward IIS-W3SVC, WAS, and Application Error events to a central log collector. This means you can search all server event logs from one console, detect patterns across the farm (e.g., the same crash happening on all nodes after a bad deployment), and raise alerts in SIEM tools like Microsoft Sentinel or Splunk. Configure with GPO Computer Configuration → Windows Settings → Security Settings → Windows Remote Management.

What is Reliability Monitor and how does it correlate with IIS incidents?

Reliability Monitor (MoRa — Maintenance Reliability History) computes a stability index (1-10) based on hardware failures, OS failures, application crashes, and software installs over the past 30 days. It displays these as a timeline chart. For IIS incidents, it is invaluable for: correlating a patch install on Tuesday with IIS crashes starting Tuesday night (Windows Update often restarts IIS-dependent services), identifying if a .NET framework upgrade preceded 500 errors, and quickly showing management a visual timeline that proves the incident started after a change. Access via: Control Panel → Security and Maintenance → View reliability history, or directly via perfmon /rel.

How do you find which process is listening on port 80?

Run netstat -ano | findstr :80 to list all connections/listeners with process IDs. The PID in the last column corresponds to Task Manager's Details view. But for IIS: port 80 is bound by HTTP.sys in kernel mode, not directly by w3wp.exe. The PID shown will be "4" (System process) because HTTP.sys is part of the system process in kernel space. To identify which IIS sites/bindings are using port 80, run netsh http show urlacl and netsh http show servicestate. IIS Manager → Sites → right pane Bindings column also shows this. Resource Monitor → Network → Listening Ports tab provides a combined view.

What is the Windows Event Log size and rotation policy and why does it matter for IIS forensics?

Each event log has a configured maximum size and an overwrite policy. Default sizes are often too small for production (Application log defaults to 20 MB). Policies: Overwrite events as needed (circular buffer — oldest deleted first when full), Archive log when full, do not overwrite events (new events discarded when full). For IIS post-incident forensics, if the logs rolled over and purged the evidence, you cannot reconstruct the timeline. Best practice: increase Application and System logs to at least 512 MB on IIS servers. Enable Log Archive (Save and Archive) so old full logs are preserved as .evtx files. Configure via Event Viewer → right-click log → Properties, or via GPO Computer Configuration → Administrative Templates → Windows Components → Event Log Service.

Scenario-based

An IIS web server is reported as "slow" at 2 AM. You log in via RDP. What is your initial 5-minute investigation plan?

1. Open Task Manager → Performance: note CPU %, available RAM, disk I/O. 2. Switch to Details, sort by CPU: identify which w3wp.exe PIDs are high. 3. Run appcmd list wp to map PIDs to app pools → identify which site. 4. Open Event Viewer → Application log, filter for errors in the last 30 minutes: look for IIS-W3SVC, WAS, and Application Error sources. 5. Check IIS logs: dir /od C:\inetpub\logs\LogFiles\W3SVC1\ — note the latest log file timestamp and tail it: type u_ex230915.log | findstr " 500 " to check for 500 errors. Total time: 5 minutes. You now know: which pool, which type of error, and whether it is resource-driven or application-driven.

You need to prove to the security team that a specific admin account logged into the IIS server last night. How do you do that?

Open Event Viewer → Windows Logs → Security. Filter for Event ID 4624 (Successful Logon) with Logon Type 10 (RemoteInteractive = RDP) between the time window in question. Each 4624 entry shows the account name, domain, logon type, source network address (client IP), and timestamp. If the Security log has rolled over, check if log archiving was enabled (archived .evtx files in the configured archive path, typically C:\Windows\System32\winevt\Logs). If log monitoring is centralised (SIEM), check there. If IPSec or firewall logs are available, the source IP of the RDP session gives additional corroboration. Document Event ID, timestamp, account name, source IP, and session ID for the security report.

After a new Windows Server deployment, performance counters for IIS are missing in Performance Monitor. Why and how do you fix it?

IIS performance counters are registered when IIS is installed but can become corrupt or missing after failed updates, IIS repair, or .NET reinstallation. Two causes: (1) IIS Web Service counter provider not registered. Fix: from an elevated command prompt run lodctr /R to reset all counters to base state, then re-register IIS: %windir%\system32\inetsrv\setupconsole.exe or repair IIS via Server Manager. (2) .NET performance counter DLL corrupt. Fix: aspnet_regiis -r or lodctr /R followed by lodctr aspnet_perf.ini. After fixing, run winmgmt /resyncperf to synchronise WMI with the counter store. Restart Server Manager to refresh available counters.

Event Viewer shows Event ID 1000 (Application Error) for w3wp.exe with faulting module clr.dll. What does this indicate and what are your next steps?

Faulting module clr.dll indicates a crash inside the .NET Common Language Runtime inside the IIS worker process. This is a managed/unmanaged boundary issue — typically a corrupted .NET write, a stack overflow, or an access violation in .NET code. Next steps: (1) Check the mini dump if one was created in %LOCALAPPDATA%\CrashDumps or the path configured in the Registry under WER (Windows Error Reporting). (2) Enable ADPlus crash dumping or configure WER to create full user dumps: create a registry key HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\w3wp.exe with DumpType=2 (full dump). (3) Reproduce the crash and collect the dump. (4) Analyse with WinDbg + SOS: .loadby sos clr, then !analyze -v and !clrstack to get the managed call stack at crash time. Escalate to development team with the managed call stack.

Disk Management shows the C: drive is 99% full on an IIS server. What do you clean up immediately?

Prioritised cleanup in order: 1. IIS logs: C:\inetpub\logs\LogFiles\ — often 10s of GB of W3C log files. Archive logs older than 30 days to another volume first, then delete. 2. Windows temp files: C:\Windows\Temp — can accumulate large temporary installer files. 3. Windows CBS (Component-Based Servicing) store cleanup: Dism /Online /Cleanup-Image /StartComponentCleanup — reclaims GB from superseded Windows Update components. 4. Windows Update download cache: C:\Windows\SoftwareDistribution\Download — safe to clear when no update is in progress. 5. IIS Failed Request Trace logs: C:\inetpub\logs\FailedReqLogFiles\ — if FREB logging was left on by accident. 6. Application temp/log directories under the site root. Set up disk free monitoring (alert at <15%) to prevent recurrence.

🌐 Real-world Usage

Windows administration tools are foundational for L1/L2/L3 support engineers on IIS environments. Every on-call runbook for a Windows web server references Event Viewer and Task Manager as first-response steps. Performance Monitor data is the evidence base for capacity upgrade requests, SLA compliance reports, and incident post-mortems.

📝 Summary

Task Manager gives real-time resource visibility; Event Viewer provides historical event logs with the complete story of what happened; Performance Monitor delivers counter-based metrics for trending; Disk Management handles storage. Together they form the diagnostic toolkit every IIS administrator must be fluent in before touching a production server.