April, 2010

  • Michael Niehaus' Windows and Office deployment ramblings

    Driver Management: What you are doing

    • 0 Comments

    Thanks to Rod, Chris, Reed, and others who helped encourage people to check out the driver management survey blog posting I made last night, I was quickly able to get over a hundred replies.  Now that’s what I call “instant feedback”.  So here’s the interpreted results based on that sampling.

    For those of you using MDT 2010 Deployment Workbench and Lite Touch deployments, the breakdown looks nice:

    image

    So 21% just import all the drivers and let the system figure it which ones to use on each computer (not too bad when the number of models is smaller).  27% import all drivers and then use selection profiles to control which drivers to use (typically per OS).  And the majority of you are taking it even further and leveraging driver folders (DriverGroups), effectively becoming “control freaks”.

    While no one said they were using the “install drivers using applications” as their primary mechanism for handling drivers using Lite Touch, over 30% of those using Lite Touch said they were installing at least some drivers as applications once the OS was up and running – basically implementing hybrid scenarios.

    For those of you using ConfigMgr 2007, the breakdown is a little different:

    image

    So 9% import all their drivers and let the “Auto Apply Drivers” step inject the best one. 24% use “Auto Apply Drivers” with categories to better control which drivers are used.  The majority then use “Apply Driver Package”, with 39% importing the drivers into the driver store (the way driver packages were intended to be used) and the remaining following Johan’s approach (not importing drivers, creating driver packages pointing to the physical store).

    So a lot of you are importing all of your drivers into the ConfigMgr driver store, but to make that work a significant percentage of you are purposely defeating the ConfigMgr duplicate driver detection by creating a unique file that results in a different has for every driver:

    image

    When you drill into the responses a little deeper, several of those that answered “manually handling duplicates” said that they were primarily Dell shops and were using the Dell driver CAB files.  As I mentioned in the MMS session, these CAB files include a unique “release.dat” file so they defeat the duplicate detection process, so they are unknowingly in the other category.  As a result, the percentages are probably flipped around, with the majority of customers preventing ConfigMgr from detecting duplicates.

    So that means almost 60% of ConfigMgr OSD users are somehow working around the driver management challenges in the product (28% following Johan’s advice, and about half of the 63% that are using driver categories and driver packages and defeating duplicate detection, so 28+63*0.50=59.5).  I believe the PowerShell scripts I posted can help reduce this number, at least for OSD users willing to reconsider their approach, or new users just setting up their OSD driver management strategy.

    As with Lite Touch, about 30% of ConfigMgr OSD users said they were installing some drivers as applications (packages).  But again this wasn’t the prevalent mechanism being used, it was being done for selected drivers as part of a hybrid scenario.

    There are a variety of tools and sites being used to help with the driver acquisition/extraction process.  Johan talked about some of these, like 7-Zip, WinRAR, Universal Extractor, the Windows Update Catalog, and the HP Softpaq Manager, during the MMS session we presented.  Others that were mentioned in survey responses included DriverMax, Driver Magician (and the Lite version), DriverGrabber, and the Lenovo Update Retriever.  But still the majority of you are still using the manual download-and-figure-out-how-to-extract-without-breaking-your-computer method (the mechanism I was struggling with before MMS).

    There was a good deal of praise for the Dell driver CABs, and quite a few calls for other OEMs and vendors to start providing the same type of simple download.  But many commented that the OEMs and vendors are still providing too much “junk” in their driver downloads, bloating drivers stores unnecessarily.

    Many of you express frustration with mass storage drivers (probably a sign of how many of you are still using Windows XP, as these problems pretty much go away with later OSes).  Some of you have run into issues running driver installers during a ConfigMgr task sequence (usually a result of the task sequence running in SYSTEM context with no user profile loaded – these probably are usually the sign of an InstallShield installer that wants to talk to a COM server, but that can’t be used as COM isn’t yet fully initialized while the task sequence is running). 

    A few of you would like tools to help with driver lifecycle management – helping with the driver store management, delivering driver updates to machines previously deployed, using tools like SCUP to help with driver deployment, making more OEM drivers available automatically through WSUS, etc.

    Of course there were plenty of suggestions for things Microsoft could do to help and a few rather frustrated people who just want the whole problem to go away.  But there is a larger group (still in the minority for sure) that says they’ve got this process mastered.  Let’s hope they all start blogging with all the details of how they’re doing it Smile

    Overall, this does pretty much confirm what Johan and I were saying in our session:  here are the scenarios that you can consider; here are the pros, cons, and challenges you are likely to encounter in each scenario; here are the tools that can help.  Granted, even with a hundred responses this isn’t a statistically valid survey, but it at least gives you some idea of what’s going on in the real world.

    As always, if you have any specific feedback or comments, you can e-mail me at mniehaus@microsoft.com or submit comments on this (or any) blog posting.

  • Michael Niehaus' Windows and Office deployment ramblings

    Driver Management: What do you think?

    • 0 Comments

    Johan and I talked about various ways to handle drivers with MDT 2010 (Lite Touch) and ConfigMgr 2007 during our MMS 2010 session.  We think we’ve addressed the common options and challenges that you are likely to encounter, but without your feedback we can’t really confirm this.

    Could you take a minute of your time and fill out the survey at http://www.surveymonkey.com/s/S55HFPN?  It’s very short, with a total of four questions.

    If you prefer, you can also add comments to this blog posting or e-mail me directly at mniehaus@microsoft.com.

  • Michael Niehaus' Windows and Office deployment ramblings

    ConfigMgr 2007 Driver Management: The Novel, part 3

    • 1 Comments

    In the first part of this series, I talked about the three (well, four with Johan’s) approaches for managing drivers with ConfigMgr 2007.  There’s actually another method that I didn’t mention so far (one that we briefly mentioned at the end of the MMS session):

    • “Treat them all as software”
      • In this scenario, you’ll basically not use the driver injection capabilities in ConfigMgr at all.  Instead, you’ll install all the drivers using “Install Software” steps after the new OS is up and running.  This assumes the images being deployed already contain all the needed network or mass storage drivers.  (You could choose a hybrid scenario to handle these, more on that below.)
      • Pros:
        • Many drivers require software packages anyway (especially more complicated ones like wireless broadband cards, Bluetooth adapters, etc.), so this way the driver and the application get installed at the same time.
        • You don’t need to figure out how to extract the drivers, just how to install the package silently.
      • Cons:
        • You have to figure out how to run the driver installer silently.  If you can’t figure this out, you need to repackage the driver (something that is something of an art form).
        • Some OSes (e.g. Windows XP) may prompt because of the missing drivers before the actual installation occurs.
        • If you put each driver into a separate package, you’ll end up with lots and lots of packages (see the part 1 posting for what challenges lots of packages presents).
        • If you combine the driver software into a single package, you’ll need to wrap all the installers so that a single script or batch file installs them all.

    Honestly, I didn’t think anyone did this for all of their drivers, although I did expect to see this done for a few limited drivers (such as the more complicated ones I mentioned before).  But I have found a couple of customers who do exactly this: every driver is installed as an application.  Still, I expect that to be rare in the “real world”.

    So that leads us to the topic of “hybrid scenarios” – you can mix and match these scenarios to address all of your driver needs, something I would strongly encourage.  Imagine a task sequence that uses something like this:

    • “Apply driver package” for all model-specific drivers.
    • “Auto apply driver” for all miscellaneous drivers (e.g. printer drivers, smart card drivers, other USB drivers – things that will be found on random machines in the environment).
    • “Install Software” for drivers that are more easily installed with their software once the new OS is up and running.

    See Chris Nacker’s blog posting at http://myitforum.com/cs2/blogs/cnackers/archive/2010/04/09/configuration-manager-2007-r2-sp2-driver-management.aspx for a real-world example of how you might set up something like this.

    In the session I also showed a simple script that created driver packages pointing to existing folders in the driver store, to quickly set up “Johan’s Control Freak Method”.  That script was basically the same script as attached to the previous blog posting, with all the logic for importing drivers into the driver store stripped out, since that logic isn’t used in Johan’s scenario.  That script, named CreateJohanDriverPackages.ps1 (which still depends on the SCCM.psm1 module), is attached to this blog posting.

    Johan has also added a new blog posting detailing the MDT 2010 Lite Touch scenarios, which you can find at http://www.deployvista.com/Blog/JohanArwidmark/tabid/78/EntryID/132/language/en-US/Default.aspx.

    A few other random driver-related items that may be of interest:

  • Michael Niehaus' Windows and Office deployment ramblings

    ConfigMgr 2007 Driver Management: The Novel, part 2

    • 2 Comments

    In the previous posting at http://blogs.technet.com/mniehaus/archive/2010/04/29/configmgr-2007-driver-management-the-novel-part-1.aspx, I mentioned that it should be possible to script the importing of drivers into the ConfigMgr driver store to help implement the “Added Predictability” (driver categories) and “Complete Control” scenarios by solving the duplicate driver import challenge using PowerShell.  So that’s the whole purpose of this posting.

    Regardless of whether you want to use driver categories or driver packages, the same logic can be used to import drivers into the ConfigMgr driver store.  This assumes that you have your physical driver store arranged appropriately, using Johan’s blog at http://www.deployvista.com/Home/tabid/36/EntryID/82/language/en-US/Default.aspx as an example of how to do that.  The attached scripts really take it further than just a recommendation:  it’s a requirement for the script to work.  The script assumes that you will have a structure that looks something like this:

    \\SERVER\DriverStore\XPx86\LatitudeD610\

    \\SERVER\DriverStore\XPx86\LatitudeD630\

    \\SERVER\DriverStore\Win7x86\LatitudeE6410\

    \\SERVER\DriverStore\Win7x64\HPxw8400\

    etc.

    You can extract the script file from the Zip file attachment on this blog entry.  You can place the ImportAllDrivers.ps1 script wherever you like, but the SCCM.psm1 module must be placed where PowerShell can find it; see the comments at the top of that script for more details.

    The ImportAllDrivers.ps1 PowerShell script needs to be modified to specify the UNC path of the physical driver store (it must be a UNC) and the UNC path where the driver packages should be placed (package source folders that should be created).  You also can specify whether to create driver packages by OS platform (e.g. “XPx86”) or by OS platform and model (e.g. “XPx86-LatitudeD610”).  If you want to use “Apply Driver Package” you’ll want packages per model.

    So in the script, edit these three lines as appropriate:

    $driverStore = "\\mdt-r2-sccm\DriverStore"

    $modelPackage = $false

    $packageSource = \\mdt-r2-sccm\Packages

    The flow of the script is then like this:

    • For each OS and platform folder:
      • Create or retrieve the platform-specific driver package (if you don’t want model-specific packages)
      • For each model folder in the current folder:
        • Create or retrieve the model-specific driver package (if you do want model-specific packages.)
        • Create or retrieve a category name that matches the OS, platform and model (e.g. “XPx86-LatitudeD610”).
        • For each driver folder in the model folder:
          • Import the driver.  If an error is generated because of a duplicate driver, find the duplicate driver and process it instead.
          • Add the category to the selected driver.
          • Add the driver to the driver package.

    Assuming everything works properly, when this script is complete you can then add the necessary steps to the task sequences (either “Auto Apply Drivers” steps with one specific category selected in each and conditions on each, or “Apply Driver Package” steps with a different package on each and conditions on each), distribute the new driver packages to the needed distribution points, and you’re set to go.

    As I mentioned in the session, this script can be run multiple times and should be able to pick up any new folders or drivers added.  But it doesn’t contain any logic to remove extra folders or drivers – that’s still going to be a separate effort.

    Also, don’t expect the script to run quickly – the process of hashing all the drivers and then copying them into the driver packages takes quite a while.  In my test VM which has drivers for about 20 different models of machines (which haven’t been cleaned up much at all) the script runs for hours.  If you think about it, you would typically never process that many drivers at one time – you would do this incrementally, probably one model at a time.  So the script is not really running that slow – it’s just doing lots of work.

    That actually points out another effort that this script doesn’t help with:  Cleaning up the physical store.  For example, when I downloaded some “Windows 7 x86” drivers from the vendor’s web site, I also got x64 drivers that I might not have needed or already have downloaded separately.  I also got Windows XP and Windows Vista drivers that I might not need.  And then there’s all the other garbage (Windows Installer 2.x installers, videos, documentation, Linux drivers, MS-DOS drivers, etc.) that can also be pruned from the directory tree.  The end result of the downloads and extractions was 14GB of driver files (not including another 6GB from the actual self-extracting installers, but I threw those away), even though only about 10-20% of that is really needed.  Maybe someday someone will write a script or tool to help with the management of the physical store too.  That’s a much more complicated task though.

  • Michael Niehaus' Windows and Office deployment ramblings

    ConfigMgr 2007 Driver Management: The Novel, part 1

    • 0 Comments

    I can tell just starting out on this topic that it’s going to be a long one.  For those of you who attended the session that Johan and I presented at MMS 2010, we talked about various ways of managing drivers, with Johan focusing on MDT 2010 Deployment Workbench (Lite Touch) and me focusing on ConfigMgr 2007 (Zero Touch).  We focused on the whole range of possibilities, ranging from “total chaos” through “complete control freak”, mapping those into the capabilities provided by the product.

    Since I focused on the ConfigMgr side of things in the session, I’ll focus on the same thing here.  Basically, here’s how it maps out:

    • “Total Chaos”
      • In this scenario, you basically just import all the drivers into the ConfigMgr driver store, then let the standard “Auto Apply Drivers” step figure out what drivers are needed on each machine.
      • Pros:
        • This is really easy to set up: Create a physical driver store folder structure (arrangement doesn’t matter much), copy all your drivers into it, import them all into the ConfigMgr driver store.
      • Cons:
        • Predicting which driver will be used on each machine will be challenging.  (It will follow the standard driver ranking rules, but those aren’t always obvious.)
        • Testing on each model of machine is essential to make sure they all work as expected.
        • Each driver imported may affect other machines, so you need to re-test each time you import a new driver.
    • “Added Predictability”
      • In this scenario, you still import all the drivers into the ConfigMgr driver store, but along the way you assign categories to each driver, with the categories reflecting the computers that need the drivers, typically identified by the OS and the model of computer to be used (e.g. “XPx86-Latitude E6410”).  You can then specify on the “Auto Apply Drivers” task sequence step which categories should be used on each machine.  (That process can be made dynamic using something like Ben Hunter’s script posted at http://blogs.technet.com/deploymentguys/archive/2008/04/18/configuration-manager-dynamic-driver-categories.aspx.  Otherwise, you would need multiple “Auto Apply Driver” steps each with a condition that limits when that step runs.)
      • Pros:
        • You have much more control over what drivers are used on each machine.
        • Importing a new driver doesn’t affect all models, only those associated with the specified categories.  Testing can then be limited to those models.
        • Driver packages are used only for content distribution, so they can be set up however you like.
      • Cons:
        • Importing duplicate drivers presents a challenge.  When ConfigMgr detects a driver that has the same hash value as an existing driver, it generates an error saying the driver is already present.  But it doesn’t assign that driver to the category and package that you specified in the wizard – it just drops it.  So you need to go back through all the drivers and figure out which driver that is so you can manually add the needed category.  (That’s where the PowerShell scripts come in, more on that later.)
        • Arrangement of the driver directories in the physical driver store (which you build manually before importing the drivers) is important because you’ll need to import them one folder at a time.  (See Johan’s blog post at http://www.deployvista.com/Home/tabid/36/EntryID/82/language/en-US/Default.aspx for a suggested folder structure.)
    • “Complete control”
      • In this scenario, you’ll use driver packages to group drivers (so categories don’t matter), with one driver package created for each OS and model combination (e.g. “Win7x86-ThinkPad W500”).  You then add multiple conditional “Apply Driver Package” steps into each task sequence, specifying when to use which package (again, typically by OS and model).  (There’s no way to make this dynamic like you can with driver categories.)
      • Pros:
        • You explicitly specify which drivers you want on each machine – never any question about what will be injected (everything in the package).
        • You can add drivers even if PnP detection says they aren’t needed (e.g. two-phase drivers or drivers for devices not currently on or connected).
      • Cons:
        • Pretty much all the “cons” from the previous “Added Predictability” scenario still apply here: duplicate drivers are a challenge, physical store arrangement is very important.
        • The task sequence will only run when all the packages are available on a distribution point.  So you need to be careful when you refresh any of the packages as you won’t be able to run the task sequence until the DP update is complete.  (That’s really true for any package referenced by the task sequence, not just driver packages.)
        • If you have lots of models to support (e.g. hundreds), you might run into task sequence size limitations requiring modifications to the WMI provider memory allocation on your ConfigMgr site server.  You’ll also put an extra load on your management points, as a new task sequence advertisement will generate a policy download for the task sequence as well as for each referenced package (so 100 driver packages equals 100 policy downloads, even though only one will actually be downloaded later and used) – make sure your management points can handle it.
    • “Johan’s Control Freak Method”
      • This scenario, like the previous one, uses “Apply Driver Package” with unique packages for each OS and model.  But unlike the previous scenario, you only import the drivers that are needed for boot images (e.g. NICs and mass storage drivers), leaving it pretty bare.  When you create the driver packages, instead of pointing to an empty folder you’ll point to a folder on your physical driver store – basically, you’ve already built the contents you want in the package and you “trick” ConfigMgr into using it.  (Apparently Johan ignored the documentation like that at http://technet.microsoft.com/en-us/library/bb632329.aspx that says to specify “an empty directory share”.)  Johan goes through the full details in his posting at http://www.deployvista.com/Home/tabid/36/EntryID/82/language/en-US/Default.aspx.
      • Pros:
        • Very easy to set up.  Once you’ve organized your physical driver store by OS and model, you just create one new driver package for each OS and model.
        • Otherwise, the pros are the same as the previous “Complete control” scenario.
      • Cons:
        • Probably stretches the “supportability” boundaries, since I don’t think this was supposed to work this way.
        • Package availability, task sequence size limitations, and MP load are the same as with the “Complete control” scenario.

    As we mentioned in the session, you will probably pick one of these scenarios as the “primary” one for your organization, but these can also be combined into “hybrid” approaches.

    Historically I’ve always suggested that people use one of the first three mechanisms, but because of the way ConfigMgr handles duplicate drivers the second (“Added Predictability” with categories) and third (“Complete Control” with driver packages) are challenging, especially if you want to set those up by hand.  Various people have proposed solutions around that, including articles like these and various newsgroup postings over the years:

    http://wbracken.wordpress.com/2009/09/26/adding-duplicate-drivers-to-sccm-sp1/

    http://myitforum.com/cs2/blogs/jsandys/archive/2010/04/05/duplicate-drivers-helper-script.aspx

    In fact, this is the same solution that Dell has implemented in their driver CABs available for download from http://www.delltechcenter.com/page/Dell+Business+Client+Operating+System+Deployment+-+The+.CAB+Files:  They put a “release.dat” file into each driver folder (with different content, to change the directory hash) so that ConfigMgr doesn’t see any of the drivers as duplicates.  That certainly solves the problem, but does it by defeating ConfigMgr duplicate detection process altogether.  As a result, the ConfigMgr driver store will also end up being much bigger.  That “release.dat” file also defeated the duplicate detection in MDT 2010’s Deployment Workbench, so we added explicit logic to look for that file and ignore it when calculating hashes.  That way we see the duplicates again (which keeps our driver store as small as possible too).

    OK, so how do you implement the “Added Predictability” and “Complete Control” scenarios without either going to Johan’s approach or defeating the duplicate detection (or doing it manually, a process that’s really hard to do as finding the duplicate manually won’t be easy)?  That’s where the PowerShell scripts came in.  As I discovered early last year when researching this topic, ConfigMgr knows which driver is the duplicate (obviously) and will tell you which one it is when you make the request via the ConfigMgr WMI provider (not so obviously) – you just don’t see that information through the UI.  But with a script, you should be able to do something like this:

    1. Try to import a new driver.
    2. If the import fails, get the existing driver from the error reported.
    3. Assign the driver to the specified category (whether new or existing).
    4. Add the driver to the specified package (whether new or existing).

    So the next posting will focus on that part:  Using PowerShell to import drivers while handling the duplicates along the way.

    Enough “driver babble” for now.

  • Michael Niehaus' Windows and Office deployment ramblings

    Dumping Task Sequence Variables

    • 1 Comments

    Several people asked me after the troubleshooting session I presented at MMS 2010 how to write a script to dump out all the task sequence variables.  Here are a few samples showing how to do just that.  (These examples work for ConfigMgr and MDT Lite Touch task sequences.)

    First, the absolute “bare bones” approach:


    Set env = CreateObject("Microsoft.SMS.TSEnvironment")
    For each v in env.GetVariables
       WScript.Echo v & " = " & env(v)
    Next

    Save that as “DumpVar.vbs” and run it via the task sequence, redirecting the output to a text file.  For example, if you saved this script in the MDT “Scripts” folder, you could use a command line like this:

    cmd.exe /c cscript.exe "%ScriptRoot%\DumpVar.vbs" >> %Temp%\DumpVar.txt

    If you want to get fancier, you can use MDT’s logging capabilities:


    <job id="ZTIConnect">
       <script language="VBScript" src="ZTIUtility.vbs"/>
       <script language="VBScript">

       Set env = CreateObject("Microsoft.SMS.TSEnvironment")
       For each v in env.GetVariables
          oLogging.CreateEntry v & " = " & env(v), LogTypeInfo
       Next

       </script>
    </job>


    Save that as “DumpVar.wsf” in the MDT “Scripts” folder, and run it with a simpler command line:

    cscript.exe "%ScriptRoot%\DumpVar.wsf"

    If you would prefer to use PowerShell, the same thing can be done with it:


    # Determine where to do the logging
    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
    $logPath = $tsenv.Value("_SMSTSLogPath")
    $logFile = "$logPath\$($myInvocation.MyCommand).log"

    # Start the logging
    Start-Transcript $logFile

    # Write all the variables and their values
    $tsenv.GetVariables() | % { Write-Host "$_ = $($tsenv.Value($_))" }

    # Stop logging
    Stop-Transcript


    Save that as “DumpVar.ps1” in the MDT “Scripts” folder, and run it using PowerShell.exe (as long as execution of scripts has been enabled):

    PowerShell.exe –File "%ScriptRoot%\DumpVar.ps1"

    Here are some related links:

    http://blogs.technet.com/deploymentguys/archive/2008/08/29/outputting-all-the-configuration-manager-task-sequence-variables.aspx

    http://blogs.technet.com/mniehaus/archive/2009/09/22/running-powershell-scripts-as-part-of-a-task-sequence.aspx

    A few people commented on how they could see my Administrator account and password details in the output of the script I was running, as I had specified that account for my ConfigMgr network access account.  That’s definitely not a best practice – you should specify an account that has the minimum rights required, typically just enough to connect to your distribution point shares.  It should never have domain admin rights.  (Yes, I was lazy and just reused the only account I set up in my demo VMs.)

    You might wonder why the example script above that uses ZTIUtility.vbs doesn’t log the password.  That’s because we have specific logic in that script that refuses to log any line that contains the word “password” as a security feature.

  • Michael Niehaus' Windows and Office deployment ramblings

    MMS 2010: Seek out the Windows deployment experts

    • 0 Comments

    MMS 2010 is bound to be a busy week for everyone attending.  But while you’re there, be sure to attend the Birds of a Feather sessions in the evenings.  There will be two sessions this year on Windows deployment, both on Tuesday evening.  The first one I’ll be moderating:

    OE01 Ask the Experts: Microsoft Deployment Toolkit (MDT) 2010
    Tuesday, April 20 5:30 PM - 6:30 PM, Marco Polo 702

    And if that isn’t enough for you, the session immediately following that, which will be led by Chris Nackers:

    OE31 Open Forum Discussion: Microsoft Deployment Toolkit 2010 (MDT) and Configuration Manager 2007 OSD
    Tuesday, April 20 6:45 PM - 7:45 PM, Marco Polo 702 

    These sessions are designed for open discussions, so the actual topics discussed will be determined by the questions asked by the audience. 

    There’s going to be a bumper crop of Windows deployment experts there this year too – hopefully most of them will be able to attend the Tuesday night sessions.  Even if they can’t, be sure to track them down during the week to at least say “hi”.  Some of those that will be around (assuming the volcanic ash and airlines cooperate) include:

    • From the team working on MDT 2010 Update 1:  Mary Anne Blake, Rajat Kumar, Jim Wightman, Chris Adams, Cameron King, Ben Shy, Michael Schmidt, Tim Mintner, Keith Garner, and myself
    • From the ConfigMgr team, John Vintzel
    • From the Windows team, Jeremy Chapman
    • From Microsoft Services:  Ben Hunter, Doug Klokow, Richard Smith
    • From other consulting firms:  Andreas Hammarskjold, Johan Arwidmark, Mikael Nystrom
    • More people from the MyITForum crowd than I can possibly name

    Sorry if I missed anyone, and hope to see you all there.

  • Michael Niehaus' Windows and Office deployment ramblings

    Make sure a ConfigMgr task sequence has all the packages it needs

    • 9 Comments

    If you’ve done ConfigMgr OS deployments, you’ve probably seen an error dialog like this before:

    image

    Pretty simple, right?  Distribute this package to a local DP and then try again.  But there are often dozens (or in extreme cases, hundreds) of packages referenced by the package, so you might have to go through this cycle a few times before you get them all.  Fortunately, there are some ConfigMgr WMI classes that can help figure out which packages are missing.  With a little bit of PowerShell logic, we can automate the whole process, through these basic steps:

    1. Get a list of all the task sequences.
    2. Get a list of all the packages referenced by those task sequences.
    3. Compare the complete list of distribution points against the list for each referenced package.
    4. Add a new distribution point to each package that is missing (keeping in mind that only boot images need to be distributed to SMSPXEImages$ distribution point shares).

    This process will take care of boot images, OS images, OS install packages, driver packages, software update packages, or any other type of packages that are referenced (because behind the scenes, packages are packages to ConfigMgr – only the UI differentiates).

    The scripts needed to this are attached to this blog.  You’ll need to save the SCCM.psm1 file in an appropriate PowerShell module folder (see the comments in the script for more details) so that the CheckTaskSequences.ps1 script can find it (and of course you’ll have to enable PowerShell script execution using something like “Set-ExecutionPolicy RemoteSigned”).  Then, just run CheckTaskSequences.ps1 each time you create a new task sequence.  It will very quickly identify the packages that need to be distributed and take care of those for you.

    Note:  Version 1.1 of the script is now attached (using version 1.5 of SCCM.psm1) to address a couple of bugs found in the current version.  See the comments in CheckTaskSequences.ps1 for more information.

Page 1 of 1 (8 items)