Recover Previous Computer Names

Does your computer store a list of all computer names it has had? For example, let's say your computer name is changed each reboot, would your computer somewhere have a list of all the previous computer names it has had?

2

3 Answers

You can only find the last name of the computer, a list is not possible. Open the Registry Editor and navigate to the address:

HKLM\Software\Microsoft\SchedulingAgent\OldName

Source

7

If the computer changed name recently, you can find it in the event viewer in Security, filter eventid 4648 . Then you can chose the date, and you will see what was the computer name at that time.

1

This should search security log for your previous computer names that do not match your current one:

$SecLog=get-eventlog security -InstanceID 4648 | where {$_.MachineName -notlike "$Env:Computername"}

Then you can use that first variable to give you the whole list (probably lots of duplicates)

$AlloldNames=$SecLog.MachineName

This one will give you just the most recent old name that does not match your current one:

$MostRecentOldName=$SecLog.MachineName[0]

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like