Adding Imaged Host to Domain and Renaming

  • Hi Guys,

    Just a bit of background. I have been given a project to roll out Win 7 to our XP machines in 2 offices without spending much money lol. So I came across Fog, and glad I did. Great bit of kit and very thankful for everyone that made it possible.

    Firstly I have built my Windows 7 Machine that I want to take the image from, taken the image and even deployed it on one other PC. All good except for a couple of things.

    1 - How do I get it to join domain? (yes I have done the FogCrypt majiggy and added it in etc still no luck when I image the PC)

    2 - How do I know Fogprep is working? Is there a log somewhere I can read etc. What alternative do I have if Fogprep isn’t working? I have tried sysprep with a custom unattend.xml but I have no idea what I am doing and it screwed up the last time I tried it. Kept telling me Windows hasn’t installed properly must restart and keeps looping.
    I have 2 images one is 32 bit and 1 64bit. I am currently testing the 32bit. Does anyone have a working unattend file?


    P.S: only thing left is for my PCs to join domain and re-naming the PCs

  • Thanks so much for the info! So helpful! Do I follow the same steps to change the domain of an already registered host without imaging it again?

  • Thanks again for everything!

  • Moderator

    Great. If you plan to use KMS for activation, or use WSUS, you’ll still need to sysprep, but your answer file will not try to rename the pc or join it to a domain. Use a * for the computer name, because you don’t care what sysprep calls it, FOG will rename it. Do not use the unattendjoin section of the answer file, because FOG will join the computer to the domain after it’s renamed.

    You need to sysprep /generalize at some point in your image creation process (either audit or oobe mode) for Windows to generate a new CMID for use with KMS and WSUS and possibly other systems. If you use MAK or can hold onto the OEM key, you don’t have to worry about CMID for KMS activation, only if you use WSUS or something else that identifies workstations based on their CMID.

    I’m redoing my Windows 7 images this year, trying to work out the duplicate CMID problem I had last year. We are trying to move to KMS for Windows 7, and ADBA for Windows 8 and Office 2013. Seems every time you figure something out, MS changes it.

  • Hi Chad,

    I have tried the approach you suggested, no fogprep or sysprep. After imaging the PC it JOINED THE DOMAIN!

    Thank you so much for that the only problem I had is the Service didn’t start automatically if I have it as Logon as (the domain fog account).

  • Moderator

    I do not use FOGPrep in 0.32/Windows 7. I also do not strictly use sysprep unless I’m trying to solve a windows problem, as FOG can image fine without it if you are using similar hardware for all hosts sharing an image. However, I do not ever use the resizable image type. I always choose Multiple Partitions - Single Disk when I create images for my laptops and desktops that are running Windows 7 and only have 1 disk to image.

    There are AD settings in the Other Information -> Fog Settings page. There is a setting on the same page to globally enable the host name changer service globally, but it is a duplicate of the FOG Configuration -> Host Name Changer option. In the FOGClient config on the host, you can also enable/disable the host name changer service.

  • Just to clarify where is the AD join information in 0.32? I can see the Join domain after image option when I go to hosts, is there another AD option?

  • So If I am using Win 7 and Fog 0.32 I don’t need to use FOGPrep? Just Sysprep and upload image?

    Interesting, because that was the first thing I tried but it didn’t work. Will double check everything and try again.

  • 2008 R2 and FOG 0.29 here

  • Moderator

    I have not added netdom to windows 7 and the wiki documentation says this is not required as of FOG 0.28. I use the basic FOG client from 0.32 and Windows 7 professional and it joins our domain.

  • 2008 R2

  • Moderator

    What is your forest and domain functional levels? We are at 2003 on both.

  • That may be the issue. Our AD domain was setup before I arrived here. He may have removed those rights. I’ll look into it.


  • No need for netdom, make sure the user that you use has delegated control to join/delete computers on the domain. Hopefully your not using the Domain Admin account. We use Domain\user for the username too or else there is an error.

  • You must do something different chad. We cannot successfully join the domain without netdom. It gives a trust relationship everytime.

  • Moderator

    Windows 7 joins to the domain without requiring netdom.

    I image windows 7 pro 32 and 64 bit using sysprep. I do not use Fogprep, as it’s not required with Windows 7 and FOG 0.32.

    These are the steps I used to get it working:

    1. Run FOGCrypt on a windows machine to encrypt your password.
    2. When you install the FOG client, make sure to enable the hostnamechanger portion
    3. Enable the hostname changer portion on the FOG settings of the server.
    4. Input the AD join information in the FOG settings. I use domain\username for the username. Password is the encrypted password from step 1. Domain is the FQDN of the domain, like
    5. Make sure the hosts are setup to join AD in the Active Directory menu item on the hosts screen.

    After you do this, image a client. It should boot to windows, rename, reboot, join domain, and reboot. I do not use FOG to put client into a specific OU, just the default Computers (which you can redirect I hear, but have no experience). After computers join the domain, I put the computers into specific OU’s and groups for policy and management.

  • Any time man. I know how much work it is starting out and getting used to some of the quarks.

  • So sorry I completely ignored that! Thank you sooo much for this. Will let you know how I get on.

  • I attached a zip file with it inside to my last post

  • Ok sorry just slightly confused. Where do I find this Netdom file?

    yes I have fog service installed.