Day 7: Imaging & Rejoining Domain


Project Type: Windows Server | Workstation Imaging | Domain Management
Skill Level: Intermediate
Lab Platform: Hyper-V + VMware + Windows 10


Why I Built This

Day 7 of my 10-day hands-on IT lab series is focused on creating and rejoining workstation images to the domain. This task is essential for environments where system reimaging is necessary, such as when preparing machines for deployment or restoring a system to a clean state. I used Sysprep to generalize a Windows 10 image, cloned it, and then rejoined the machine to the domain, simulating a common IT support scenario.

In this day, I also simulated profile migration to ensure user data is restored properly after a reimage, simulating a real-world help desk task.


Lab Setup Overview

ComponentDetails
HypervisorHyper-V (Main Hypervisor)
VMware PlatformVMware Workstation Pro
Domain Namewired.com
Subnet192.168.1.0/24
DC IP Address192.168.1.10 (Static)
Client DNS192.168.1.10 (Domain Controller)
New ClientsLab-W11-Baseline (Windows 11 on Hyper-V/VMware)

Step-by-Step Breakdown

Phase 1: Prepare the Clean Image

  1. Log in as local admin on your Windows 11 client (e.g., NYC-CLI1).
  2. Clean up the system:
    • Remove saved credentials.
    • Delete temp files (use cleanmgr or Storage Sense).
    • Unpin personal apps from the Start menu.
    • Optionally update Windows.
    • Join the system to a workgroup if it’s already part of the domain (optional but cleaner).
  3. Create a local admin user named LabAdmin.

Phase 2: Run Sysprep

  1. Open Command Prompt as admin.
  2. Navigate to C:\Windows\System32\Sysprep.
  3. Run sysprep.exe.
  4. In the Sysprep window, choose:
    • System Cleanup Action: Enter System Out-of-Box Experience (OOBE)
    • Check Generalize
    • Shutdown option: Shutdown
  5. Click OK. Result: The machine is now prepared for a fresh image, and once it shuts down, do not boot it again.

Phase 3: Clone the VM

  1. In Hyper-V or VMware, right-click the VM and choose Export (Hyper-V) or Clone (VMware).
  2. Name the clone: Lab-W11-Baseline.
  3. Import or power on the cloned VM, NOT the original. Result: You now have a fresh workstation image with a reset copy.

Phase 4: Boot & Complete OOBE

  1. Power on the cloned VM (NYC-CLI1-Clone).
  2. Go through the Out-of-Box Experience (OOBE):
    • Set Language and Local Admin credentials (LabAdmin).
  3. Log in to Windows. Result: The cloned VM is now ready with a fresh Windows setup.

Phase 5: Rejoin the Domain

  1. Right-click This PC > Properties > Rename this PC (advanced).
  2. Change the name to: NYC-CLI1-R.
  3. Join the domain: wired.com.
  4. Use domain credentials (e.g., wired\administrator) to join the domain.
  5. Reboot when prompted. Result: The machine is now rejoined to the domain with a clean configuration.

Key Problems Solved

  • Creating a Clean Image: Successfully used Sysprep to generalize the Windows 10 system for a fresh start.
  • Workstation Cloning: Cloned the virtual machine and prepared it for redeployment without needing to reinstall the OS.
  • Profile Migration: Simulated a real-world scenario of migrating user profiles and restoring data from a backup after a system reimage.

Troubleshooting Tips

  • Sysprep Fails to Generalize?
    • Ensure that no apps are pinned to the taskbar or Start menu, as they can cause Sysprep to fail.
    • Remove any user-specific apps and clear temp files.
  • Cloned VM Doesn’t Boot?
    • Double-check that you powered on the cloned VM, not the original.
    • Ensure the cloned machine is not connected to the original domain controller.
  • Profile Migration Doesn’t Work?
    • Verify the backup folder was correctly copied before running Sysprep.
    • Use USMT for a more automated approach if manual copy isn’t preferred.

What I Learned

  • Imaging Process: How to prepare and generalize a system image using Sysprep, clone it, and deploy it in a domain environment.
  • Domain Rejoin: The importance of correctly renaming the machine and using the right credentials when joining it back to the domain.
  • Profile Migration: Understanding how to restore user profiles manually or via USMT after a system reset.

What’s Next?

In Day 8, I will focus on:

  • Setting up osTicket on an Ubuntu server.
  • Installing and configuring the LAMP stack (Linux, Apache, MySQL, PHP).
  • Integrating osTicket with the domain (optional LDAP integration).
  • Simulating help desk scenarios and resolving tickets using osTicket’s support platform.

Stay tuned as I build and configure the osTicket system for IT support management!


Follow the Journey

This blog post is part of my Real-World IT Lab in 10 Days series. Stay tuned for Day 8, where I will dive into osTicket setup and help desk ticket management.

Follow me on LinkedIn for more updates and insights!


Leave a Reply

Your email address will not be published. Required fields are marked *