Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / How to Find a Previous Computer Name in Windows

October 29, 2025

How to Find a Previous Computer Name in Windows

After changing the name of the Windows computer (hostname), I needed to find out its previous (old) computer name.

It is possible to retrieve the previous computer name from the HKLM\SOFTWARE\Microsoft\SchedulingAgent registry key. Use the Registry Editor to check the value of the OldName parameter, or query the registy item value using PowerShell:

(Get-ItemProperty HKLM:\SOFTWARE\Microsoft\SchedulingAgent\).oldname

get previous windows computer oldname from registry

It contains the computer name that was generated during the installation of Windows. Any further computer renames will not be displayed here.

To view the full history of a computer’s hostname changes, check the Event Viewer logs for host rename events.

  1. Open the Event Viewer snap-in (eventvwr.msc)
  2. Expand Windows Logs -> System
  3. Filter the event log by Event ID 6011filter event viewer by event 6011
  4. Open the latest event with this ID. The event description contains details of the previous and new computer name:
     The NetBIOS name and DNS host name of this machine have been changed from WIN10-OLD01 to Win10-NEW01

    event shows previous hostname in windows

You can list all available hostname change events from the Event Viewer log using PowerShell.

Get-WinEvent -FilterHashtable @{ LogName = 'System';Id = 6011} | Select-Object TimeCreated, Id, Message

If the Windows Event Logs have been cleared or if new events have been overwritten by the old ones (due to the insufficient size of the Event Viewer log files), the history of hostname changes can be obtained from the C:\WINDOWS\Debug\NetSetup.LOG file.

To quickly search for events relating to changes to the hostname or joining/leaving a domain/workgroup, use the Select-String cmdlet to filter the contents of this log file.

Select-String c:\WINDOWS\Debug\NetSetup.LOG -Pattern "NetpValidateName"

filter NetSetup.LOG

0 comment
0
Facebook Twitter Google + Pinterest
Windows 10Windows 11
previous post
How to Enable or Disable Windows Defender Firewall
next post
Remote Desktop (RDP) Not Working in Windows 11

Related Reading

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

Bridging Multiple Network Interfaces on Windows

November 21, 2024

Fix: Windows Update Tab (Button) is Missing from...

December 16, 2024

How to Prefer IPv4 over IPv6 in Windows...

April 15, 2025

How to Detect Which User Installed or Removed...

June 25, 2025

Find a Process Causing High Disk Usage on...

July 16, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 23, 2025

Map a Network Drive over SSH (SSHFS) in...

May 13, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • How to Find a Previous Computer Name in Windows

    October 28, 2025
  • How to Delete a Windows Service via CMD or PowerShell

    October 16, 2025
  • Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)

    October 6, 2025
  • How to Disable (Enable) Credential Guard in Windows 11

    October 6, 2025
  • Wrong Network Profile on Windows Server after Reboot

    September 30, 2025
  • How to Get Windows 10 Extended Security Updates After End-Of-Life

    September 24, 2025
  • Blocking NTLM Connections on Windows 11 and Windows Server 2025

    September 23, 2025
  • Windows Stucks at ‘Getting Windows Ready, Don’t Turn Off Computer’

    September 15, 2025
  • Clean Up ETL Log Files in ProgramData

    September 9, 2025
  • Fix: Slow Startup of PowerShell Console and Scripts

    September 3, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Upgrading to Windows 11 on Unsupported Hardware
  • Create a Custom Windows Image with Pre-installed Apps
  • Converting Windows 10 to Enterprise LTSC Without Losing Data
  • Configuring RemoteApps Hosted on Windows 10/11 (without Windows Server)
  • Get Started with Docker on Windows (WSL2) without Docker Desktop
  • Permanently Disable Driver Signature Enforcement on Windows 11
  • How to Assign (Passthrough) a Physical GPU to a Hyper-V Virtual Machine
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top