Chris Nackers Blog

ConfigMgr and MDT Deployment Solutions

Useful Blogs

User Groups

December 2009 - Posts

SiteBound for ConfigMgr – Scripting subnet boundaries

SiteBound is a tool that allows bulk addition of boundaries to ConfigMgr (SCCM ) sites. Adding boundaries through the ConfigMgr console can be tedious if adding more than a handful. Previously for SMS 2003 there was the Siteboun.exe tool which solved this problem, however, to my knowledge there is not a version of this tool available for ConfigMgr 2007. If there is, then oh well I still learned something.
This tool is not as full featured as the Siteboun tool for SMS 2003. It will only add new boundaries to a ConfigMgr site.

http://www.codeplex.com/sitebound

http://sitebound.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=14144

SCCM SP2 Health Check Startup Script

Chris Stauffer posted an updated version of his Client Health Script, version 1.7.

Check it out here:

http://myitforum.com/cs2/blogs/cstauffer/archive/2009/12/18/sccm-sp2-health-check-startup-script-1-7.aspx

Identifying Collections A Computer Is in

This query will show you what collections a computer is a member of.  Thanks to Todd and Brian on the SCCM myITForum list.

Select

v_R_System.Name0, v_Collection.Name

From v_R_System

Left join v_FullCollectionMembership on v_FullCollectionMembership.ResourceId = v_R_System.ResourceId

Left join v_Collection on v_FullCollectionMembership.CollectionId = v_Collection.CollectionId

Where Name0 = 'computer you're looking for'

ConfigMgr and/or MDT – Useful WMI Queries and WMI Tools

Wanted to post a blog entry with typical WMI “backend” queries for limiting Task Sequence steps.  My intention is to update this as I find more queries that we use. I’m going under the assumption that you know where to use this query, so I won’t be showing any examples or screenshots or instructions on using this with a Task Sequence step/variable.

Keep in mind that you can find out information you can query by using WMIC.  Common usage for model/driver type queries would be pulling information from CSPRODUCT, aka “WMIC CSPRODUCT” or “WMIC CSPRODUCT GET NAME”.

Here is a chart of info for queries. 

http://blogs.1e.com/index.php/2009/09/23/wmic-aliaswmi-class-mapping/

WMI Tools from Microsoft gives you CIM Studio and Object Browser which are great for browsing WMI information to see possible properties to query.  Or you can always use “wbemtest” to enumerate classes.

Microsoft WMI Tools

Sample Queries

I pretty much always use a LIKE statement with variables.  In the world of HP model #’s, or other manufacturers, you don’t want to have 10 queries for the same model, variables eliminate the need for multiple queries, you can also do OR statements, but again I feel it’s easier to accomplish with a variable.

Query for Hardware ID:

SELECT * FROM Win32_PnPEntity WHERE DeviceID like 'PCI\\VEN_8086&DEV_2822%'

Example usage is querying for the hardware ID of a video card that might be on multiple systems. You might want to tie a driver package to this step and only apply the driver package when the video card is detected.  Useful if the card is installed in various models.

Query for Version:

Select * from Win32_ComputerSystemProduct where Version like"%T61%"

Query for Model:

SELECT * FROM Win32_ComputerSystem WHERE Model LIKE "%2765T6U%"

Automating ConfigMgr Wizard Screens

Kenneth Titlestad posted a creative way to automate the “Welcome” screen for PXE/Media boots.

See his post here:

http://www.deploymenttech.com/index.php?option=com_content&view=article&id=242:trojan-horse-in-sccm-&catid=34:blog&Itemid=1

.Net Framework Setup Verification Tool

http://blogs.msdn.com/astebner/pages/8999004.aspx

Here is a utility that allows you to test your installation of .net framework.  I’m blogging this so I can find it again :-) I’ve used it in the past to verify installations when we’ve encountered .net framework issues. Please see Aaron Stebner’s blog for information linked above.

Here is some of the information in his post:

Introduction

This .NET Framework setup verification tool is designed to automatically perform a set of steps to verify the installation state of one or more versions of the .NET Framework on a computer.  It will verify the presence of files, directories, registry keys and values for the .NET Framework.  It will also verify that simple applications that use the .NET Framework can be run correctly.

Supported products

The .NET Framework setup verification tool supports removing the following products:

  • .NET Framework 1.0
  • .NET Framework 1.1
  • .NET Framework 1.1 SP1
  • .NET Framework 2.0
  • .NET Framework 2.0 SP1
  • .NET Framework 2.0 SP2
  • .NET Framework 3.0
  • .NET Framework 3.0 SP1
  • .NET Framework 3.0 SP2
  • .NET Framework 3.5
  • .NET Framework 3.5 SP1

Download location

The .NET Framework setup verification tool is available for download at the following locations:

 

Microsoft Deployment Toolkit – Tattoo Information

Another great feature of MDT integration with SMS/ConfigMgr is the information that is tattoo’d into the system during deployment.  Through the use of a sms_def.mof extension, you can then report against this information and create a web report or reports to identify imaged systems and the relevant information you want to see.

In the MDT documentation and scripts you will see “Tattoo” spelt “Tatoo”.  It’s been that way for a long time :) Just be aware, i’m not mispelling it. 

What I’ve done is created a web report that can show me when the system was imaged, the deployment type used (ZTI Refresh or a Media/PXE boot), the OSD adv ID, and the OSD Program Name used.  The below screenshot samples are specifically from SMS 2003 and MDT 2008, however the information is still relevant with SCCM and MDT 2010 and I’ve provided information for MDT 2010 and SCCM. 

When a system is built using MDT integration, the ZTITatoo.wsf script embeds this information into the registry, then using your MOF extension you can then collect and report against this information.

The following properties are available to MDT 2008:

 

DeploymentMethod, DeploymentType, OSDAdvertID, OSDPackageID, OSDProgramID, OSDSiteCode, OSVersion, TaskSequenceID, TaskSequenceName, TaskSequenceVersion

 

The following properties are available to MDT 2010:

DeploymentMethod, DeploymentType, DeploymentTimestamp, BuildID, BuildName,           BuildVersion, OSDPackageID, OSDProgramName, OSDAdvertisementID, TaskSequenceID, TaskSequenceName, TaskSequenceVersion

This is the process that runs with MDT 2008 and MDT 2010 per the MDT Documentation:

1. Locate and copy the ZTITatoo.mof file to the %SystemRoot%\System32\Wbem folder. Any preexisting ZTITatoo.mof that exists at the destination will be deleted before starting the copy operation.

2. Mofcomp.exe will be run using the following command: %SystemRoot%\System32\Wbem\Mofcomp.exe -autorecover %SystemRoot%\System32\Wbem\ZTITatoo.mof.

3. These deployment details are written to the registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4:

· Deployment Method is set to DeploymentMethod.

· Deployment Type is set to DeploymentType.

· Deployment Timestamp is set to the current date in WMI date format.

· Task Sequence ID is set to TaskSequenceID.

· Task Sequence Name is set to TaskSequenceName.

· Task Sequence Version is set to TaskSequenceVersion.

4. If OSDPACKAGEID is not NULL, these deployment details are written to the registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4:

· OSD Package ID is set to OSDPACKAGEID.

· OSD Program Name is set to OSDPROGRAMID.

· OSD Advertisement ID is set to OSDADVERTID.

5. If OSDPACKAGEID is not NULL, these deployment details are written to the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion:

· CM_DSLID is set to OSDSITECODE:OSDPACKAGEID.

Sample Web Report for SMS 2003/MDT 2008:

image

SMS 2003/MDT 2008 MOF Extension:

// MDT 2008 Deployment Data, added by (name) (date)
// ----------------------------------------------------

#pragma namespace ("\\\\.\\root\\cimv2\\sms")
[ SMS_Report     (True),
  SMS_Group_Name ("Microsoft BDD Info"),
  SMS_Class_ID   ("MICROSOFT|MicrosoftBDDInfo|1.0") ]
class Microsoft_BDD_Info : SMS_Class_Template
{
    [SMS_Report (TRUE), key ]  
        string InstanceKey;
    [SMS_Report (TRUE)      ]  
        string DeploymentMethod;
    [SMS_Report (TRUE)      ]  
        string DeploymentType;
    [SMS_Report (TRUE)      ]  
        string DeploymentTimeStamp;
    [SMS_Report (TRUE)      ]  
        string BuildID;
    [SMS_Report (TRUE)      ]  
        string BuildName;
    [SMS_Report (TRUE)      ]  
        string BuildVersion;
    [SMS_Report (TRUE)      ]  
        string OSDPackageID;
    [SMS_Report (TRUE)      ]  
        string OSDProgramName;
    [SMS_Report (TRUE)      ]  
        string OSDAdvertisementID;
};

ConfigMgr MDT 2010 MOF Extension:

// MDT 2010 Deployment Data, added by (name) (date)
// ----------------------------------------------------

[ SMS_Report     (True),
  SMS_Group_Name ("Microsoft BDD Info"),
  SMS_Class_ID   ("MICROSOFT|MicrosoftBDDInfo|1.0") ]
class Microsoft_BDD_Info : SMS_Class_Template
{

    [SMS_Report (TRUE), key ]  
        string InstanceKey;
    [SMS_Report (TRUE)      ]  
        string DeploymentMethod;
    [SMS_Report (TRUE)      ]  
        string DeploymentType;
    [SMS_Report (TRUE)      ]  
        string DeploymentTimeStamp;
    [SMS_Report (TRUE)      ]  
        string BuildID;
    [SMS_Report (TRUE)      ]  
        string BuildName;
    [SMS_Report (TRUE)      ]  
        string BuildVersion;
    [SMS_Report (TRUE)      ]  
        string OSDPackageID;
    [SMS_Report (TRUE)      ]  
        string OSDProgramName;
    [SMS_Report (TRUE)      ]  
        string OSDAdvertisementID;
    [SMS_Report (TRUE)      ]  
        string TaskSequenceID;
    [SMS_Report (TRUE)      ]  
        string TaskSequenceName;
    [SMS_Report (TRUE)      ]  
        string TaskSequenceVersion;


};

Documenting your SMS/ConfigMgr Infrastructure

Whether it’s SMS 2003 or ConfigMgr, it’s important to document your infrastructure and settings.  Thanks to the community we have a few utilities that can do this automatically for you. 

SMSMap

http://www.tondtware.com/downloads.html

Here is a TechNet article describing SMSMap, and the latest version can be found at the link above.    SMSMap will create a Visio document of your infrastructure and roles. 

ConfigMgr / SCCM /  SMS Documentation Script v1.18

Another tool is a script created by Garth Jones that will spit out detailed information into a word document about your infrastructure.

http://enhansoft.com/Pages/Downloads.aspx

This script will spit out a very detailed document with the following information:

TABLE OF CONTENTS

2.1. Basic Site info.............................................................................................. 3

2.1.1. Site1(example)..................................................................................................... 3

2.1.2. Site2 (example)..................................................................................................... 3

2.2. Agents....................................................................................................... 3

2.2.1. Client Agent Setting................................................................................. 3

2.2.2. Hardware Inventory.................................................................................. 3

2.2.3. Software Inventory................................................................................... 4

2.2.4. Software Metering Agent Setting.................................................................. 4

2.2.5. Software Update Agent Setting..................................................................... 4

2.2.6. Remote Control Agent Settings..................................................................... 4

2.2.7. Software Distribution Agent Settings.............................................................. 5

2.3. Boundary.................................................................................................... 7

3.1. List of Collections.......................................................................................... 7

4.1. List of Packages.......................................................................................... 30

5.1. List of Advertisements.................................................................................. 57

6.1. List of Software Metering Rules....................................................................... 112

7.1. List of Queries.......................................................................................... 116

8.1. List of Web Report...................................................................................... 124

ConfigMgr USMT Migration Bug

Known bug that has been talked about on the lists quite a bit.  Looks like the SCCM team blog posted something on it finally:

http://blogs.technet.com/configmgrteam/archive/2009/12/01/known-issue-migrating-from-windows-xp-to-windows-7-with-usmt-when-used-with-configmgr-2007-sp2-os-deployment-may-not-migrate-all-settings.aspx

-Chris