11 Windows Security Commands for SOC Analysts and What to Look For

SOC analysts use a small set of read-only Windows commands to triage a suspicious host quickly.

Jun 16, 2025 - 10:08
Updated: 
104.9k

SOC & Blue Team in Cybersecurity & Ethical Hacking · Commands & reference

SOC Analyst, lesson 5 of 16

11 Windows Security Commands for SOC Analysts and What to Look For

Quick answer: SOC analysts use a small set of read-only Windows commands to triage a suspicious host quickly. The most useful are Get-WinEvent for security events (failed logons 4625, new processes 4688, new services 7045), netstat -ano and Get-NetTCPConnection for network connections, Get-Process for running programs, Get-MpComputerStatus and Get-MpThreatDetection for Microsoft Defender health, auditpol /get to confirm logging is enabled, Get-LocalGroupMember for admin accounts, schtasks /query and Win32_StartupCommand for persistence, and Get-HotFix for patches. Run them from an elevated prompt where needed, only on systems you are authorised to examine, and record what you run.

Key takeaways

  • All commands here only read information; they do not change the system.
  • Check audit policy first, because missing logs mean missing evidence.
  • Focus on logons, processes, services, connections and persistence.
  • Map findings to MITRE ATT&CK techniques for reporting.
  • On live incidents, prefer EDR or forensic collection to avoid altering evidence.

Table of Contents

What Should You Check Before Running Commands?

Confirm you are authorised, note the host name and time, and open PowerShell as administrator because the Security log needs elevation. If the host may be compromised, consider isolating it and collecting evidence with your EDR first. Know where logs live; our guide to Windows log file locations covers that.

Keep a simple triage log: the command, the time you ran it and a short note of what you saw. Save output to a case folder rather than retyping it, and compare results with a known good machine of the same build so normal entries are easier to rule out. Commands give a quick snapshot, not a full investigation, so escalate whenever results look unusual.

Is Logging Turned On?

1. auditpol /get shows the current audit policy.

auditpol /get /category:*

Look for Logon, Process Creation and Security Group Management set to Success and Failure. If Process Creation shows No Auditing, event 4688 will not exist.

How Do You Search Security Events?

2. Failed logons (4625). Get-WinEvent with a filter hashtable is fast:

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 50

Many 4625 events from one source suggest password guessing (ATT&CK T1110).

3. New processes (4688).

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4688} -MaxEvents 50 | Format-List TimeCreated, Message

Watch for Office apps launching PowerShell or cmd, or encoded command lines.

4. New services (7045).

Get-WinEvent -FilterHashtable @{LogName='System'; Id=7045} -MaxEvents 20

Unexpected services can indicate persistence or remote execution tools (T1543.003).

Which Commands Show Network Activity?

5. netstat lists connections with process IDs:

netstat -ano

6. Get-NetTCPConnection gives the same data as objects:

Get-NetTCPConnection -State Established | Sort-Object RemoteAddress

7. Get-Process links a PID to a program and path:

Get-Process -Id 1234 | Select-Object Name, Id, Path

Replace 1234 with the PID you found. Unknown programs in user folders talking to external addresses deserve attention. See Get-NetTCPConnection documentation for filters.

How Do You Check Microsoft Defender Status?

8. Get-MpComputerStatus shows whether protection is healthy:

Get-MpComputerStatus | Select-Object AMServiceEnabled, RealTimeProtectionEnabled, AntivirusSignatureLastUpdated

Real-time protection turned off on a user machine is a red flag (T1562.001). Then list recent detections:

Get-MpThreatDetection

How Do You Look for Persistence and Privilege?

9. Local administrators:

Get-LocalGroupMember -Group Administrators

10. Scheduled tasks and startup items (schtasks query):

schtasks /query /fo LIST /v
Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, Location

11. Installed updates:

Get-HotFix | Sort-Object InstalledOn -Descending

Unknown admin accounts, tasks running scripts from temp folders and long gaps in patching all need follow-up.

Which Command Answers Which Question?

QuestionCommandATT&CK link
Is logging enabled?auditpol /getSupports all detection
Password guessing?Get-WinEvent 4625T1110
Suspicious processes?Get-WinEvent 4688, Get-ProcessT1059
New services?Get-WinEvent 7045T1543.003
Odd connections?netstat -ano, Get-NetTCPConnectionT1071
Defender tampered?Get-MpComputerStatusT1562.001
Persistence?schtasks /query, Win32_StartupCommandT1053.005, T1547
Extra admins?Get-LocalGroupMemberT1098

Technique details are in MITRE ATT&CK. These commands are part of daily work described in our SOC analyst job description. Practise them in a lab through our SOC analyst training.

References

Frequently Asked Questions

Use Get-WinEvent with a filter for the Security log and event ID 4625, which records failed logon attempts.

No. Every command in this guide only reads information, although running anything on a live host leaves small traces.

Reading the Security event log and some Defender details requires an elevated PowerShell session on most Windows systems.

Event 4688 records a new process being created, and it only appears when Process Creation auditing is enabled.

Run Get-MpComputerStatus and check that AMServiceEnabled and RealTimeProtectionEnabled are both True and signatures are recent.

Both list network connections, but Get-NetTCPConnection returns PowerShell objects that are easier to filter and sort.

Review scheduled tasks with schtasks, startup items with Win32_StartupCommand and new services through event ID 7045.

Only with authorisation, and preferably after isolating it and collecting evidence with EDR or forensic tools to preserve integrity.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.