Can't use netdom - TechRepublic
Question
September 16, 2008 at 05:40 AM
spector

Can’t use netdom

by spector . Updated 17 years, 9 months ago

Hi. I’m trying to rename a computer remote using netdom but can’t get it to work. I use the following examples:
http://support.microsoft.com/default.aspx?scid=kb;en-us;298593&sd=tech

and I have also tried this script:

‘On Error Resume Next

‘open the file system object
Set oFSO = CreateObject(“Scripting.FileSystemObject”)
set WSHShell = wscript.createObject(“wscript.shell”)

Dim sNewCname ‘Variable to hold Computer Name you enter in the inputbox
Dim sOldCname ‘computers current name

‘First param is message text, second is message title
sOldCname = InputBox(“Enter computers current name”,”Windows 2k3 Netdom Rename Script”)
sNewCname = InputBox(“Enter computers new name”,”Windows 2k3 Netdom Rename Script”)

Call WSHShell.Run(“cmd.exe /K NETDOM RENAMECOMPUTER ” & sOldCname & ” /newname:” & sNewCname & ” /userd:domain\admin /passwordd:pass /usero:admin /passwordo:pass /force “)

But nothing works for me. When I run the example on the microsoft link it shows me the syntax of netdom. Running the script says wrong login/pass.
I’ve change “domain” too our real domain name and change the “user/pass” to our real user/pass.
What do I do wrong?

This discussion is locked

All Comments