MDT 2008

MDT 2008, VMWare Workstation and Stop 0x7B

When working with the Microsoft Deployment Toolkit (MDT) I spend a lot of time in VMWare Workstation as it makes the job of developing and testing a workstation image much simpler. However there is one big gottcha that you should be aware of. Make sure you edit your .VMX file and modify the following:

scsi0.present = “TRUE” should be changed to scsi0.present = “FALSE”

If you don’t do this then after deploying a Syspreped image to VMWare Workstation you’ll end up with a Stop 0x7B error and much less hair than when you started.

Thanks Chris for reminding me of something I supposedly knew. :)

Read more

Can you use $OEM$ Files with SCCM 2007 OS Deployments?

The answer is yes! My first clue for solving this came from deployvista.com, “Using the $OEM$ folder with SCCM 2007 OS Deployments“. To summarize you need to place your $OEM$ files into C:\_SMSTaskSequence\OSD\$OEM$ in order for Windows Setup to use the files. Here is what I did:

  1. Added my $OEM$ Files to my MDT Settings Package. (The one with unattend.txt, sysprep.inf and customsettings.ini)
  2. Add Z-CONFIG-CopyOEM.wsf to your MDT Source Files package. I’ve provided it below. (Remember to update DP)
  3. In your Task Sequence right before “Setup Windows and ConfigMgr” add a new “Run Command Line” task.
  4. Set the Name to “Copy OEM Files”.
  5. Set the Command Line to “cscript.exe “%deployroot%\scripts\Z-CONFIG-CopyOEM.wsf”.
  6. Click the “Package” checkbox and select your MDT Settings Package.
  7. All Done!

The guts of the script is pretty simple stuff and it works because when you set a Package in a Run Command Line Task the current directory is the path to whatever package you’ve select. In this case the current directory is the MDT Settings package containing our $OEM$ files.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'//----------------------------------------------------------------------------
'//  See if we can find the $OEM$ Directory
'//----------------------------------------------------------------------------
sDest = OEnvironment.GetOSDV4("_SMSTSMDATAPATH") & "\OSD\$OEM$"
oLogging.CreateEntry "$OEM$ Files will be copied to " & sDest, LogTypeInfo
'//----------------------------------------------------------------------------
'//  Make sure the Destination exists
'//----------------------------------------------------------------------------
MKDir sDest
'//----------------------------------------------------------------------------
'//  Get the Source Location and Copy the files
'//----------------------------------------------------------------------------
sSource = oShell.CurrentDirectory & "\$OEM$"
oLogging.CreateEntry "$OEM$ Files will be copied from " & sSource, LogTypeInfo
'Copy the folder
oFSO.CopyFolder sSource, sDest

Download the script here.

Read more

(Windows SIM) cannot create catalog files for some images of a different architecture

Today I was attempting to create a sysprep.xml file for Windows 2008. After opening my WIM file in Windows SIM I got the prompt to generate a Catalog file, clicked Yes and then……Error!! What?? Lets try that again….Error!! Whatever, lets try again, Error!! Ok this time I read the error. “System.Reflection.TargetParameterCountException: Parameter count mismatch.” Ummm, what??

After wasting almost 2 hours chasing this error I found this post on the TechNet Forums: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3066853&SiteID=17.

The key information is:

Because of the changes in the servicing stack in Windows Vista with Service Pack 1 (SP1) and Windows Server 2008, Windows System Image Manager (Windows SIM) cannot create catalog files for some Windows images of different architecture types. The following list describes the Image Manager architecture types and catalogs that can be created for each one.

x86 Windows SIM:
Can create catalogs for x86, x64, and Itanium-based Windows images.

x64 Windows SIM:
Can create catalogs only for x64 Windows images.

Itanium-based Windows SIM:
Can create catalogs only for Itanium-based Windows images. 

Please confirm if what version of Windows SIM you are using. I recommend installing x86 Windows SIM.

Hope it helps.

Tim Quan – MSFT

Update: Michael Niehaus pointed out that this information is available in the updated version of the WAIK 1.1 release notes available at http://www.microsoft.com/downloads/details.aspx?FamilyID=051091e8-51ea-4d2c-96b3-dc9863edebd9&displaylang=en.

Read more

MDT 2008 Source Code

I’m not sure how I missed this one or how long it has been available but you can download the source code for MDT 2008 from Microsoft Download. You can learn a lot about how MDT 2008 works and also a lot about managed MMC snap-ins from the MDT 2008 source code. Click here to download.

Read more

Moving to a single partition in MDT 2008 refresh scenario

I spotted an article on Micheal Niehaus’ blog the other day about moving to a single partition when doing OS deployments. You can read the article here.

This very issue arose in the project I am currently involved in and after trying reading and implementing Micheal’s post I found a couple of nuances:

    • If there is an OEM partition (like WinRE) then you risk deleting you’re OS partition. OEM partitions are often a hidden partition (Type 0×27) at the start of the disk that allow OEM’s to offer a recovery environment for their customers.
  • If there is more than a one extra partition on the disk then ExtendOemPartition=1 won’t really work.

I thought the problem deserved some more attention so I’ve written a script to be included in the “Refresh only” section of “Preinstall” in the Task Sequence that you use to deploy you’re image. The script queries WMI to find how many partition are on the disk that contains C:. If there are any partitions after the C: partition they are removed using diskpart “delete partition”.

Any comments or suggestions please let me know!

Download Z-CONFIG-RemovePartition.zip.

Read more

MDT 2008 and Powershell: Creating a distribution directory

I’ve been playing with automating MDT 2008 using Powershell and thought I’d start to share some of the info over the next few weeks.

The very first thing you need to do in MDT is create a Distribution Share. It turns out this is exceptionally easy in Powershell. The Microsoft.BDD.ConfigManager.Manager namespace has a method called UpgradeDistributionShare(string location, bool update). Just pass in the location you’d like to create the distribution share at and you’re done! You can set update to true if you are upgrading an existing Distribution Share to MDT 2008.

Here is the code:

1
2
3
4
5
6
7
8
9
10
11
Param
(
[string]$Location=$(throw"You must specify a Location")
)
#Initialize MDT
[System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft Deployment Toolkit\Bin\Microsoft.BDD.ConfigManager.dll") | Out-Null
$manager= [Microsoft.BDD.ConfigManager.Manager]
#Create a new MDT Distribution Share
$manager::UpgradeDistributionShare($Location, $false)
Read more