ANAVEM
Languagefr
Windows Active Directory management console showing computer account administration and security event monitoring
Event ID 4748InformationMicrosoft-Windows-Security-AuditingWindows

Windows Event ID 4748 – Microsoft-Windows-Security-Auditing: Computer Account Deleted

Event ID 4748 fires when a computer account is deleted from Active Directory. This security audit event tracks machine account removal for compliance and security monitoring purposes.

Emanuel DE ALMEIDAEmanuel DE ALMEIDA
18 March 20269 min read 0
Event ID 4748Microsoft-Windows-Security-Auditing 5 methods 9 min
Event Reference

What This Event Means

Event ID 4748 represents a fundamental security audit mechanism in Windows Active Directory environments. When a computer account is deleted from the domain, Windows generates this event to maintain an audit trail of machine account lifecycle changes. The event fires exclusively on domain controllers that process the deletion request, making it essential for centralized security monitoring.

The event structure includes several critical fields: the target computer account name, its security identifier, the domain name, and detailed information about who initiated the deletion. The Subject fields identify the user account that performed the deletion, including their logon ID and authentication details. This information proves invaluable during security investigations or compliance audits.

Computer account deletions can occur through various methods including Active Directory Users and Computers console, PowerShell cmdlets, LDAP operations, or automated scripts. Regardless of the deletion method, Event ID 4748 captures the action consistently. The event timing corresponds to the actual deletion from the Active Directory database, not when the deletion request was initiated.

In enterprise environments, this event helps track decommissioning workflows, identify orphaned computer accounts, and detect unauthorized administrative actions. Security teams rely on 4748 events to correlate computer account deletions with change management processes and identify potential security incidents involving rogue account management.

Applies to

Windows Server 2019Windows Server 2022Windows Server 2025Windows 10Windows 11
Analysis

Possible Causes

  • Administrator manually deleting computer accounts through Active Directory Users and Computers
  • PowerShell scripts using Remove-ADComputer cmdlet for bulk cleanup operations
  • Automated decommissioning workflows removing obsolete machine accounts
  • LDAP-based applications or tools performing computer account cleanup
  • Domain migration processes removing computer accounts from source domains
  • Security incident response procedures removing compromised computer accounts
  • Group Policy-driven cleanup scripts targeting inactive computer accounts
  • Third-party Active Directory management tools performing account maintenance
Resolution Methods

Troubleshooting Steps

01

Review Event Details in Event Viewer

Start by examining the specific Event ID 4748 details to understand what computer account was deleted and who performed the action.

  1. Open Event Viewer on the domain controller
  2. Navigate to Windows LogsSecurity
  3. Filter for Event ID 4748 using the filter option
  4. Double-click the event to view detailed information
  5. Review the Subject section to identify who deleted the account
  6. Check the Target Account section for the deleted computer name
  7. Note the Logon ID to correlate with other security events

Use PowerShell to query recent 4748 events:

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4748} -MaxEvents 50 | Select-Object TimeCreated, Id, @{Name='ComputerDeleted';Expression={($_.Message -split '\n' | Where-Object {$_ -match 'Account Name:'} | Select-Object -First 1).Split(':')[1].Trim()}}
02

Correlate with Logon Events

Cross-reference the deletion with logon events to build a complete timeline of administrative activity.

  1. Note the Logon ID from the 4748 event details
  2. Search for Event ID 4624 (successful logon) with matching Logon ID
  3. Look for Event ID 4634 (logoff) to determine session duration
  4. Check for other administrative events during the same logon session

PowerShell command to find related logon events:

$LogonID = "0x3e7"  # Replace with actual Logon ID from 4748 event
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624,4634} | Where-Object {$_.Message -match $LogonID} | Select-Object TimeCreated, Id, Message

This correlation helps determine if the deletion was part of a legitimate administrative session or potentially unauthorized activity.

03

Analyze Computer Account History

Investigate the deleted computer account's history to understand its lifecycle and determine if the deletion was appropriate.

  1. Search for Event ID 4741 (computer account created) for the same computer name
  2. Look for Event ID 4742 (computer account changed) events
  3. Check Event ID 4743 (computer account deleted) if it exists
  4. Review authentication events (4768, 4769) for the computer account

PowerShell script to trace computer account lifecycle:

$ComputerName = "WORKSTATION01$"  # Replace with actual computer name
$Events = @(4741, 4742, 4748)  # Created, Changed, Deleted

foreach ($EventID in $Events) {
    Write-Host "Searching for Event ID $EventID..."
    Get-WinEvent -FilterHashtable @{LogName='Security'; Id=$EventID} | Where-Object {$_.Message -match $ComputerName} | Select-Object TimeCreated, Id, @{Name='Details';Expression={($_.Message -split '\n')[0..5] -join ' '}}
}
04

Implement Advanced Monitoring and Alerting

Set up proactive monitoring to detect and alert on computer account deletions in real-time.

  1. Configure Windows Event Forwarding (WEF) to centralize 4748 events
  2. Create custom event log subscriptions on collector servers
  3. Set up PowerShell-based monitoring scripts
  4. Configure SIEM integration for automated alerting

Create a scheduled task to monitor for 4748 events:

# Create monitoring script
$ScriptBlock = {
    $LastHour = (Get-Date).AddHours(-1)
    $Events = Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4748; StartTime=$LastHour} -ErrorAction SilentlyContinue
    
    if ($Events) {
        foreach ($Event in $Events) {
            $Message = "Computer account deleted: " + ($Event.Message -split '\n' | Where-Object {$_ -match 'Account Name:'} | Select-Object -First 1)
            Write-EventLog -LogName Application -Source "Custom Monitor" -EventId 1001 -Message $Message -EntryType Warning
        }
    }
}

# Register scheduled task
Register-ScheduledTask -TaskName "Monitor-ComputerDeletions" -Trigger (New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Hours 1)) -Action (New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-Command $ScriptBlock")
05

Forensic Analysis and Incident Response

Perform comprehensive forensic analysis when unauthorized computer account deletions are suspected.

  1. Export all related security events to EVTX files for preservation
  2. Analyze network traffic logs for LDAP deletion requests
  3. Review change management records for authorized deletions
  4. Check backup systems for computer account restoration if needed
  5. Document findings for incident response procedures

Export security events for forensic analysis:

# Export events to EVTX file
$StartTime = (Get-Date).AddDays(-7)
$EndTime = Get-Date
$ExportPath = "C:\Forensics\Security_Events_$(Get-Date -Format 'yyyyMMdd_HHmmss').evtx"

wevtutil epl Security $ExportPath "/q:*[System[TimeCreated[@SystemTime>='$($StartTime.ToString('yyyy-MM-ddTHH:mm:ss.fffZ'))' and @SystemTime<='$($EndTime.ToString('yyyy-MM-ddTHH:mm:ss.fffZ'))']]]" /ow:true

Write-Host "Security events exported to: $ExportPath"

Create detailed incident report:

# Generate incident report
$Report = @()
$Events = Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4748; StartTime=(Get-Date).AddDays(-1)}

foreach ($Event in $Events) {
    $Report += [PSCustomObject]@{
        TimeCreated = $Event.TimeCreated
        ComputerDeleted = ($Event.Message -split '\n' | Where-Object {$_ -match 'Target.*Account Name:'} | Select-Object -First 1).Split(':')[1].Trim()
        DeletedBy = ($Event.Message -split '\n' | Where-Object {$_ -match 'Subject.*Account Name:'} | Select-Object -First 1).Split(':')[1].Trim()
        LogonID = ($Event.Message -split '\n' | Where-Object {$_ -match 'Logon ID:'} | Select-Object -First 1).Split(':')[1].Trim()
    }
}

$Report | Export-Csv -Path "C:\Reports\ComputerDeletions_$(Get-Date -Format 'yyyyMMdd').csv" -NoTypeInformation

Overview

Event ID 4748 is a security audit event that fires whenever a computer account gets deleted from Active Directory. This event appears in the Security log on domain controllers and provides critical tracking for machine account lifecycle management. The event captures who deleted the computer account, when it happened, and which specific machine account was removed.

This event is part of Windows Advanced Audit Policy Configuration under Account Management auditing. It fires on the domain controller that processes the deletion request, not on the target computer being removed. The event provides essential forensic data for security investigations, compliance reporting, and tracking unauthorized computer account deletions.

Computer account deletions typically occur during decommissioning processes, domain migrations, or cleanup operations. However, unexpected 4748 events can indicate security issues, rogue administrative actions, or automated cleanup scripts running without proper oversight. The event includes the security identifier (SID) of both the deleted computer account and the user who performed the deletion.

Frequently Asked Questions

What does Event ID 4748 mean and when does it occur?+
Event ID 4748 indicates that a computer account has been deleted from Active Directory. This security audit event fires on domain controllers when any computer account is removed from the domain, whether through manual deletion via Active Directory Users and Computers, PowerShell cmdlets like Remove-ADComputer, or automated scripts. The event provides essential tracking for computer account lifecycle management and helps maintain audit trails for compliance and security monitoring purposes.
How can I identify who deleted a computer account using Event ID 4748?+
The Event ID 4748 details include a Subject section that identifies who performed the deletion. This section contains the Account Name, Account Domain, and Logon ID of the user who deleted the computer account. You can cross-reference the Logon ID with Event ID 4624 (successful logon) events to get additional context about the administrative session. The event also includes the Target Account section showing which specific computer account was deleted, including its name and security identifier.
Why am I seeing multiple Event ID 4748 events for computer accounts I didn't manually delete?+
Multiple 4748 events often result from automated cleanup processes, PowerShell scripts, or third-party Active Directory management tools. Common causes include scheduled scripts that remove inactive computer accounts, domain migration tools cleaning up obsolete accounts, or Group Policy-driven maintenance tasks. Check the Subject field in each event to identify if they're being generated by service accounts or automated processes. Review your organization's computer account management procedures and any scheduled tasks that might be performing bulk deletions.
Can I restore a computer account after seeing Event ID 4748, and will it generate additional events?+
Computer accounts deleted from Active Directory can potentially be restored from the Active Directory Recycle Bin if it's enabled and the account is within the tombstone lifetime period (typically 180 days). Restoring a computer account will generate Event ID 4741 (computer account created) rather than a specific restoration event. However, the restored account will have a new security identifier, so the original computer will need to rejoin the domain. If AD Recycle Bin isn't enabled, you'll need to recreate the computer account manually, which also generates Event ID 4741.
How should I monitor Event ID 4748 for security purposes in an enterprise environment?+
Implement centralized monitoring by configuring Windows Event Forwarding to collect 4748 events from all domain controllers to a central collector server. Set up automated alerting for unexpected computer account deletions, especially during non-business hours or by unauthorized users. Create PowerShell scripts that run hourly to check for new 4748 events and correlate them with change management records. Integrate these events into your SIEM solution for advanced correlation with other security events. Consider creating baseline reports of normal computer account deletion patterns to identify anomalies more effectively.
Documentation

References (2)

Emanuel DE ALMEIDA
Written by

Emanuel DE ALMEIDA

Senior IT Journalist & Cloud Architect

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...