0

So I've had to deal with renaming whole rooms of PC's before due to them being swapped out and incorrectly named or generally being moved around but I've never settled on a decent workflow.

I'll give an example of the most recent situation. (Win 7 PC's and a Win 2012 server) Approx. 30 PC's numbered from 1 to potentially anything, mostly within that 1-30 range though.

As it was a complete mess all the computer objects were removed from AD to start fresh.

In many cases I can simply change the name of the PC, restart and it will fine. If that doesn't work going through the Join a Domain or Workgroup wizard works and then finally if they don't work, changing to a workgroup, restart, re-join the domain and restart does it. Occasionally get trust relationship errors and have to re-do the last one.

As you can tell, it's messy, inefficient and potentially wrong in a few ways. I know I'm at risk of sounding vague and there's unlikely to be one single answer but it's time consuming and I'm very interested in improving my methodology and hopefully it will help some people.

Crimsonfox
  • 341
  • 1
  • 2
  • 16
  • 1
    Wait a sec-- do you work at my K-12 educational Customer? >smile< (This keeps happening there year-after-year... I *finally* got them to start using the Dell Service Tag as the computer name. No more renaming! Problem solved...) – Evan Anderson Apr 07 '14 at 22:19
  • Haha maybe I do! Out of curiosity, how does it work with keeping OU's organised, just good management? – Crimsonfox Apr 08 '14 at 09:30
  • We're just about a year into using the Dell Service Tags, so it's hard to say-- we haven't had any major PC moves yet. It's going to take discipline, but it should be less work than the wild gyrations of disjoining and rejoining machines that we've seen in the past. We won't know until August - September, when we get our next round of PCs. – Evan Anderson Apr 08 '14 at 09:37
  • That's interesting, we might be moving that way as we're doing a big move this summer and an external company will be setting us up and I think I've heard they'll be doing something similar to this, they may include room number though, not 100% yet. – Crimsonfox Apr 08 '14 at 13:02

2 Answers2

2

I have been in a similarl situation before; The way I did is was using netdom, less clicks, and you can use a batch file or psexec to make life a lot easier/quicker.

e.g.

netdom renamecomputer member /newname:member1.exampledomain.com /userd:administrator

netdom add /d:exampledomain member1 /ud:exampledomain\admin /pd:password

shutdown /r
metacom
  • 196
  • 6
  • Presumably that includes removing the object from AD first (of the new name) – Crimsonfox Apr 07 '14 at 17:58
  • @Crimsonfox Well, netdom won't do that for you, but you can manipulate AD over a command line too. I'd use PowerShell over `cmd`, especially given Windows 7, but the principle is the same. Type out your command(s), use the command buffer and change the number, instead of RDPing into every machine and clicking around for a couple minutes. – HopelessN00b Apr 07 '14 at 18:22
  • Apologies, I didn't mean using Netdom to remove anything from AD, just in general. I should have also pointed out, unfortunately, the computers ideally need to be ordered so I've got to be in the room to find out which ones need changing to which names. – Crimsonfox Apr 07 '14 at 18:28
2

Based on your reply to metacom ("I should have also pointed out, unfortunately, the computers ideally need to be ordered so I've got to be in the room to find out which ones need changing to which names"), it sounds like you need an information gathering phase first.

  • Create a startup script in the language of your choice that writes the computer name to a network share. (echo %computername% >> \\server\share\room.txt or whatever)
  • Assign it to the OU in question.
  • Reboot the computers one by one in the sequence you want so the names are appended in order.

There's also sneakernet and a thumb drive or that network share, if, for whatever reason, you don't have the computers in their own little OU.

After you have those lists of computers, you could either use metacom's netdom script or something like this to rename the computers.

Katherine Villyard
  • 18,510
  • 4
  • 36
  • 59