How to create a Windows Image (.wim) file

Depending on what you need the .wim file for, you can create it manually or automatically.

– To manually create a .wim file (capture image) you need a bootable CD with Windows PE (with ImageX.exe included) that you can create using Windows Automated Installation Kit.

The basics steps are:

  1. Boot your computer using Windows PE disk.
  2. In the Windows PE command prompt navigate to the folder with ImageX.
  3. To capture the C: partition, use the following example:
    imagex.exe /capture C: D:\CapturedImage.wim “My captured image”Where: C: is the partition to be captured; D:\CapturedImage.wim is the place of the captured file; “My captured image” is the name of the file.
    More switches can be found on the ImageX Command-Line Options page.

If you need the image for deployment, do not forget to run sysprep before capturing the image!

– To automatically create a .wim file you can use a capture media created using Configuration Manager.

If you want to capture a Windows XP OS, copy sysprep files to C:\sysprep. Newer operating systems have sysprep files installed by default.

To use capture media:

  1. Insert the CD into your CD/DVD drive and shortly autoplay will open Image Capture Wizard.
  2. Clicking Next will show you Image Destination page. Select where to save the wim file.
  3. On the next page enter some information about the image.
  4. On the Summary page click Finish. The task sequence will start sysprep and restart the computer. After restart, the computer will boot to Windows PE and will capture a image of the machine.

Windows cannot obtain the domain controller name error

Today a client called me and said that his second domain controller, which is on Hyper-V, is having connectivity problems. For example, running the ping command from DC2 results in very bad response times or timed out requests.

Searching the event viewer, I saw many errors with Event ID 1054: “Description: Windows cannot obtain the domain controller name for your computer network. (The specified domain either does not exist or exist or could not be contacted). Group Policy processing aborted.

Found a Knowledge Base article on Microsoft website that basically says this is happening if the computer has some AMD technology enabled in the BIOS. Well, my client only has computers with Intel Xeon processors, so this is not the case. Anyway, having experience with such articles vs. errors, I read the article till the end. This way I found similarities with my client’s environment: computers with more than one processors.

Basically, Dual Core or multiprocessor processors may encounter Time Stamp Counter (TSC) drift if certain conditions are met:

  • number of processors
  • operating system
  • technologies enabled in the BIOS
  • BIOS version.

This conditions can affect important operations like network communications and performance monitoring tasks that are sensitive to system time

Windows XP, 2000 and 2003 servers use the TSC as a timekeeping source. Each processor core (whether it is a single-core processor or dual-core processor) includes a TSC. When the TSC for different processor cores are not synchronized, the above symptoms and behaviors can occur if the operating system is using the TSC as a timekeeping source.

The KB article’s resolution is to install a newer CPU driver that modifies the boot.ini file by adding a switch in order to force the computer to use the PM_Timer instead of TSC. Also, it says that the boot.ini file can be manually modified.

So, to manually modify boot.ini file follow the following steps:

  • Log on to the computer by using an account that has administrative credentials.
  • Click Start, click Run, type notepad c:\boot.ini, and then click OK.
  • In the Boot.ini file, a line that starts with “default” is located in the “[boot loader]” section. This line specifies the location of the default operating system. The line may appear as follows:multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Windows Server 2003 Enterprise x64 Edition” /fastdetect /NoExecute=OptIn
  • At the end of the line, add a space, and then type /usepmtimer. The line should now resemble the following.multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Windows Server 2003 Enterprise x64 Edition” /fastdetect /NoExecute=OptIn /usepmtimer
  • Save the file, and then exit Notepad.
  • Restart the computer

This resolved the connectivity problem, however I wanted to test one more thing. As DC2 was a virtual machine with 2 cores assigned, I changed it to use only one processor and modified the boot.ini file to its original state. After restarting the VM and monitoring the server for bout 20 minutes, looks like the problem went away. So this can also be a workaround. I used the first method as client preferred this one.

These are the articles I read during troubleshooting and used now to write this post:

Install software using Task Sequence

Besides using Software Distribution to install software, you can do this using a Task Sequence too. This can be done during and Operating System Deployment process or not.

Usually, I install software during an OSD. For this, you must have a package for that software product (of course) and at least one program that runs silently. If the program  requires user intervention, you will not have the possibility to add it to your TS. I hope you know the fact that the package should exist on a Distribution Point.

This is how one of my simplest TSs looks like:

To add an Install Software step, in your TS click Add from the menu and select GeneralInstall Software.


Then, type a name for this step and using the Browse button select a package to add the TS. Remember that you can only add packages that has a program to run without user intervention.

I find it useful to have a step to install latest updates after all install software steps.

One more way to install software using a TS, is to have only Install Software steps. This way, you can install multiple software products using one advertisement instead of advertising every package. I use this only when I have an OS installed and I want to install software on it.

This is how such a TS looks like:

WMI query for processor manufacturer

Following the post regarding how to install drivers based on computer model using WMI query, here is another query you can use in your task sequences to install some processor specific software for example.

To find the processor manufacturer during a task sequence, insert a condition for the step you need, and select Query WMI. Then, for WMI Namespace use root\cimv2. For WQL Query use SELECT * FROM Win32_Processor WHERE Manufacturer like “%GenuineIntel%” or SELECT * FROM Win32_Processor WHERE Manufacturer like “%AuthenticAMD%” depending on what you need.

To find the processor manufacturer of your computer, open a command prompt and type the following: WMIC CPU GET Manufacturer.

How To: Operating System deployment with MDT 2010 and ConfigMgr 2007 SP2

Johan Arwidmark, Setup & Deployment MVP, just finished working on his Version 2.0 Deployment CD. It contains the following step-by-step guides and video tutorials:

MDT 2010 Lite Touch Deployments (deployment without ConfigMgr 2007 SP2 R2, just the free tools)

  • LTI01 – Installing the server for MDT 2010 Lite Touch
  • LTI02 – Creating a Windows 7 reference image using Lite Touch
  • LTI03 – Deploying a Windows 7 image using Lite Touch
  • LTI04 – Dynamic Settings, creating and using the deployment database

MDT 2010 Zero Touch Deployments (deployment with ConfigMgr 2007 SP2 R2)

  • ZTI01 – Installing the server for MDT 2010 Zero Touch and ConfigMgr 2007 SP2
  • ZTI02 – Creating a Windows 7 reference image using ConfigMgr 2007 SP2
  • ZTI03 – Deploying a Windows 7 image using ConfigMgr 2007 SP2
  • ZTI04 – Dynamic Settings, creating and using the deployment database

Additional Presentations

  • E01 – New features in MDT 2010
  • E02 – Upgrading MDT 2008 to MDT 2010
  • E03 – Migrating Windows XP to Windows 7

And guess what? He’s offering the CD for free to everybody who needs and wants it. You can register for a free download at www.deploymentcd.com.

All reports with links to other reports

Last month, after restoring the only ConfigMgr site and importing new reports, I saw that none of the reports I’m using have a link to another report.

To be sincere, this was a problem I didn’t know where to start troubleshooting. Thanks to guys from Microsoft’s ConfigMgr forum, who helped me identify the problem and recommended some troubleshooting steps.

So, the problem was due the fact that none of my reports had a link to another report. Don’t know how this happened… Anyway, to resolve this issue, I quickly installed a ConfigMgr site in a virtual machine and using Tom Watson’s advice, created a query that lists all reports with links to other reports. The query is something like this:
SELECT     TOP (100) PERCENT ReportID, Name, Category, DrillThroughReportID
FROM       dbo.v_Report
WHERE      (NOT (DrillThroughReportID IS NULL))
ORDER BY   ReportID

and the result looks like this:

DrillThroughReportID tells the ReportdID of the linked report. Basically, in a default configuration, I know the original ReportID and the linked ReportID.

Now, knowing these info, I’m manually creating the links in my production environment. This is a long process indeed, but I couldn’t find a way to automate this.

Create collection with all Windows XP SP 1-2-3 systems

To create a collection with all Windows XP SP1 systems, use the query bellow:

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like "%Windows XP%" and SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 1"

Similarly, to create a collection with all Windows XP SP2 systems, just change the Service Pack version number:

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like "%Windows XP%" and SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 2"

And the same for all Windows XP SP3 systems:

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like "%Windows XP%" and SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 3"

During OSD, format first partition only

Our helpdesk asked me to make a task sequence that can be used on computers with more than one partition. In this case, I had to make sure that the operating system will install only on first partition and will not touch the data on other partitions.

To achieve this, I copied another TS and modified the following 2 steps:

  • removed any “Format and Partition Disk” step
  • in the “Apply Operating System Image” step, under “Select the location where you want to apply this operating system” made the following modifications:
    • Destination: Specific disk and partition
    • Disk: 0 (if all computers are installed on first hard disk)
    • Partition: 1 (if all computers have OS installed on first partition)

This way, when TS runs, it automatically wipes partition 1 from disk 0 and will not touch any other partition or disk.

Wiping volume C:\

Remote Server Admin Tools for Windows 7

Some time ago I used Admin Tools and RSAT for Vista and it saved my time from using remote desktop to log on to several servers. Now it is available (RTM, not RC or something…) for Windows 7 x86/x64.

Using RSAT for Win7, you can manage the following roles and features from Windows Server 2008 R2, 2008 and 2003:

After installing it, you can enable the roles and features you want to manage, by doing the following steps:

  1. Click Start, click Control Panel, and then click Programs.
  2. In the Programs and Features area, click Turn Windows features on or off.
  3. If you are prompted by User Account Control to enable the Windows Features dialog box to open, click Continue.
  4. In the Windows Features dialog box, expand Remote Server Administration Tools.
  5. Select the remote management tools that you want to install.
  6. Click OK.

Now you’ll find the tools in Administrative Tools menu.

How to create a Windows XP SP3 Target Computer in Configuration Manager 2007 SP1 R2

This post assumes you have created a reference computer and captured an image of it as described in the previous post.

Import and configure a task sequence to deploy the target computer

After the task sequence to deploy the reference computer (Home-XPSP3-Ref01) finishes, a captured image of the reference computer is stored in \Home-SCCMCaptures$Home-XPSP3-Ref01.wim. Now, We’ll create a task sequence that will deploy the captured image of reference computer to the target computer (Home-XPSP3-Tar01).

Create an MDT 2008 Task Sequence for the Target Computer

To create a task sequence to deploy the captured image to the target computer:

  1. Click Start, point to All Programs, and then point to Microsoft System Center. Point to Configuration Manager 2007, and then click ConfigMgr Console.
  2. In the Configuration Manager console console tree, go to Site Database/Computer Management/Task Sequences.
  3. In the details pane, click Import Microsoft Deployment Task Sequence.
  4. The Import Microsoft Deployment Task Sequence Wizard starts.
  5. Complete the Import Microsoft Deployment Task Sequence Wizard by using the information in the table below. Accept the default values unless otherwise specified
On this wizard page Select Client Task Sequence, and then click Next.
General In Task sequence name, type Windows XP SP3 Target Deployment.
In Task sequence comments, type Task sequence for deploying captured reference computer image to the target computer (Home-XPSP3-Tar01), and then click Next.
Details Click Join a domain.
In Workgroup, type Home.local.
In User name, type Work User.
In Organization name, type Work Organization.
In Product key, type product_key (where product_key is the product key for Windows XP SP3).
In Capture destination, type \Home-SCCMCaptures$Home-XPSP3-Ref01.wim.
In Capture Account, click Set, and then complete the Windows User Account dialog box by performing the following steps:

  1. In User name, type HomeAdministrator.
  2. In Password and Confirm password, type domain admin password.
  3. Click OK.

Click Next.

Boot Image In Specify an existing boot image package, click Browse.
In Select a package dialog box, click Windows PE Custom, and then click OK.
Click Next.
MDT Package In Specify an existing Microsoft Deployment Toolkit Files package, click Browse.
In the Select a Package dialog box, click MDT 2008 Files, and then click OK.
Click Next.
MDT Package: MDT Details In Name, type MDT 2008 Files.
In Version, type 1.00.
In Comments, type Provides access to MDT 2008 software during Configuration Manager deployment process, and then click Next.
OS Image Click Create a new OS image.
In OS image file (WIM) location, type \Home-SCCMCaptures$Home-XPSP3-Ref01.wim.
In Package source folder to be created, type \Home-SCCMPackages$Home-XPSP3-Ref01_Image.
Click Next.
OS Image: Image Details In Name, type Windows XP SP3 Reference Image.
In Version, type 1.00.
In Comments, type Windows XP SP3 captured image of reference computer (Home-XPSP3-Ref01) used to deploy to target computers, and then click Next.
Client Package In Specify an existing ConfigMgr client package, click Browse.
In the Select a Package dialog box, click Configuration Manager Client Upgrade, and then click OK.
Click Next.
USMT Package In Specify an existing USMT package, click Browse.
In the Select a Package dialog box, click USMT, and then click OK.
Click Next.
Settings Package Click Create a new settings package.
In Package source folder to be created, type \Home-SCCMPackages$CustomSettings_Target, and then click Next.
Settings Package: Settings Details In Name, type MDT 2008 Target Computer Custom Settings.
In Version, type 1.00.
In Comments, type Configuration settings for MDT 2008 deployment process (such as CustomSettings.ini) for the target computer, and then click Next.
Sysprep Package In Specify an existing Sysprep package, click Browse.
In the Select a Package dialog box, click Configuration Windows XP SP3 Sysprep, and then click OK.
Click Next.
Summary Displays a status bar that shows the progress of the tasks defined in the wizard. The Import Microsoft Deployment Task Sequence Wizard closes when the task sequence is imported.

Customize the target computer task sequence

By default, the task sequence sets the password for the local Administrator account to a random value. At this step we will specify the password we want.

To customize the Windows Vista Target Deployment task sequence:

  1. In the Configuration Manager console console tree, go to Site Database/Computer Management/Operating System Deployment/Task Sequences.
  2. In the details pane, click Windows XP SP3 Target Deployment.
  3. In the details pane, click Edit.
  4. In the Windows XP SP3 Reference Deployment Task Sequence Editor dialog box, go to PostInstall/Apply Windows Settings.
  5. On the Properties tab, click Enable the account and specify the local administrator password.
  6. On the Properties tab, in Password and Confirm Password, type P@ssw0rd, and then click Apply.

Select distribution point for packages and images

Running the Import Microsoft Deployment Task Sequence Wizard to create the task sequence for the target computers, creates a new software distribution package and a new image.

To select the distribution points for software distribution package:

  1. In the Configuration Manager console console tree, go to System Center Configuration Manager/Site Database/Computer Management/Software Distribution/Packages.
  2. In the details pane, click MDT 2008 Target Computer Custom Settings.
  3. In the details pane, click Manage Distribution Points.
  4. The Manage Distribution Points Wizard starts.
  5. Complete the Manage Distribution Points Wizard by using the information in the table below. Accept the default values unless otherwise specified.
On this wizard page Do this
Welcome Click Next.
Select Destination Distribution Point Click Next.
Package In Distribution points, select HOME-SCCM, and then click Next.
Completion Click Next.
Wizard Completed Click Close.

To select the distribution points for operating system images:

  1. In the Configuration Manager console console tree, go to System Center Configuration Manager/Site Database/Computer Management/Operating System Deployment/Operating System Images.
  2. In the details pane, click Windows XP SP3 Reference Image.
  3. In the details pane, click Manage Distribution Points.
  4. The Manage Distribution Points Wizard starts.
  5. Complete the Manage Distribution Points Wizard by using the information in the table below. Accept the default values unless otherwise specified.
On this wizard page Do this
Welcome Click Next.
Select Destination Distribution Point Click Next.
Package In Distribution points, select HOME-SCCM, and then click Next.
Completion Click Next.
Wizard Completed Click Close.

Deploy the captured image of the reference computer to the target computer

Create an advertisement for the target computer task sequence

To create an advertisement for the task sequence:

  1. In the Configuration Manager console console tree, go to System Center Configuration Manager/Site Database/Computer Management/Operating System Deployment/Task Sequences.
  2. In the details pane, click Windows XP SP3 Target Deployment.
  3. In the details pane, click Advertise.
  4. The New Advertisement Wizard starts.
  5. Complete the Manage Distribution Points Wizard by using the information in the table below. Accept the default values unless otherwise specified.
On this wizard page Do this
General In Comment, type Advertisement to deploy Windows XP SP3 reference image.
In Collection, click Browse.
In the Browse Collection dialog box, click All Unknown Computers, and then click OK.
Select the Make this task sequence available to boot media and PXE check box.
Click Next.
Schedule Click Next.
Distribution Point Click Next.
Interaction Click Next.
Security Click Next.
Summary Click Next.
Confirmation Click Close.

Now, we can boot Home-XPSP3-Tar01 computer from the ConfigMgr2007_TS_Boot_Media.iso file created earlier.

On the Welcome to the Task Sequence Wizard page, in the Password field type P@ssw0rd and press Next. You will see that there are two assignments: Windows XP SP3 Reference Deployment and Windows XP SP3 Target Deployment. Select Windows XP SP3 Target Deployment and click Next to start the operating system deployment.


The operating system deployment starts. If any problems occur during the deployment, consult the MDT 2008 document or learn how to troubleshoot task sequence issues in Configuration Manager.

And that was the simplest way (and with any configuration made to the operating system) to make an image of a reference computer and then use that image to deploy target computers.