Windows Admin Commands for Developers and DBAs
Windows troubleshooting gets cleaner when CMD is used for legacy checks and PowerShell is used for structured inspection. A DBA should be able to prove host identity, service state, ports, disk pressure and recent errors before changing an application or database.
Host identity
hostname
whoami
ver
ipconfig /all$PSVersionTable.PSVersion
Get-ComputerInfo | Select-Object OsName, OsVersion, CsName
Get-Date -Format o
Get-LocationServices and database processes
Use service state before restarting anything. Look for SQL Server, PostgreSQL, MySQL, Oracle, web server and queue worker services.
Get-Service | Where-Object {$_.Name -match 'sql|postgres|mysql|oracle|iis|nginx|apache'} | Sort-Object Status, Name
Get-Process | Sort-Object CPU -Descending | Select-Object -First 15
tasklist | findstr /i "sql postgres mysql oracle"DNS and port reachability
PowerShell's Test-NetConnection helps separate DNS, route and blocked-port issues.
Resolve-DnsName formalint.com
Test-NetConnection formalint.com -Port 443
Test-NetConnection db.example.internal -Port 1433
Test-NetConnection db.example.internal -Port 5432
netstat -ano | findstr LISTENINGDisk and filesystem pressure
Get-Volume
Get-PSDrive -PSProvider FileSystem
Get-ChildItem C:\ -Directory | Sort-Object LastWriteTime -Descending | Select-Object -First 20Event logs
Event logs help confirm whether a failure is a service crash, login problem, disk warning, driver issue or application error.
Get-EventLog -LogName Application -Newest 80
Get-EventLog -LogName System -EntryType Error,Warning -Newest 80
Get-WinEvent -LogName Application -MaxEvents 50 | Select-Object TimeCreated, ProviderName, Id, LevelDisplayName, MessageDBA handoff checklist
- Record host, Windows version, user and timestamp.
- Record database service status and recent log errors.
- Check disk volume health and backup destination space.
- Check port reachability from the application host.
- Attach commands and outputs to the incident note after removing secrets.
Prefer read-only commands first. Restarting a database service should be a deliberate change, not the first diagnostic step.
Related: Terminal Workflows, DBA Admin Roadmap, Hardware Diagnostics.