|
Answer» I have a couple of labs with xp machines that all have the wrong computer name. does anyone know of a WAY to change the computer name through dos?How To Use the Netdom.exe Utility to Rename a Computer in Windows XP
http://support.microsoft.com/kb/298593
you can change comp name through vbscript Code: [SELECT]strComputer = "." SET objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colComputers = objWMIService.ExecQuery ("Select Name from Win32_ComputerSystem") For Each objComputer in colComputers ErrCode = objComputer.Rename("mynewcompname", "password", "Administrator") If ErrCode = 0 Then WScript.Echo "Computer renamed correctly." Else WScript.Echo "Eror changing computer name. ERROR code: " & ErrCode End If Next
|