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?
23 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 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.
1This 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.MachineNameThis one will give you just the most recent old name that does not match your current one:
$MostRecentOldName=$SecLog.MachineName[0]