I need a way to remotely rename a Windows 10 computer after it has been freshly imaged. Windows is assigning a default name (ie: WINDOWS-34JDR8E) and I'd like to be able to run a VBScript that asks for the current name of the system (ie: WINDOWS-34JDR8E), asks for the new name (ie: NEW-NAME), and successfully renames the computer without having to manually log into the computer and manually rename it.
I searched around a lot and the only thing I could find that indicated it worked in Windows 10 was a batch file used to run a WMIC command (ie: wmic /node:"oldname" computersystem where caption="oldname" call rename name="newname" username="administrator" password="adminpassword"). The command returns a value of 0 (zero) when successful but more often then not returns 1312, which basically means it didn't work.
Has anyone got any magic up their sleeves that will work to remotely rename a Windows 10 computer on a domain?
I searched around a lot and the only thing I could find that indicated it worked in Windows 10 was a batch file used to run a WMIC command (ie: wmic /node:"oldname" computersystem where caption="oldname" call rename name="newname" username="administrator" password="adminpassword"). The command returns a value of 0 (zero) when successful but more often then not returns 1312, which basically means it didn't work.
Has anyone got any magic up their sleeves that will work to remotely rename a Windows 10 computer on a domain?