Issue

Need the ability to retrieve hardware information for a new hardware platform (not in ConfigMgr inventory) in order to scan the machine for OEM drivers using Driver Manager.

Solution

Create an OSD task sequence to enable a new hardware platform to be PXE booted and then run DMScanner to retrieve the hardware inventory.

Requirements

  • Driver Manager 1.0

  • ConfigMgr OSD Boot Image (x86)

  • WAIK installed to C:\Program Files\Windows AIK

  • New hardware platform has a formatted NTFS partition e.g. Windows OEM installation
WARNING! Do NOT perform this procedure in a production environment without first fully testing in a non-production test environment.


Process

Done Task
 
1. Create a custom OSD boot image
 
2. Create a DMScanner software package
 
3. Create a DMScanner task sequence
 
4. Assign and test the task sequence



1. Create a custom OSD boot image

  • Create a temporary working folder e.g C:\work and a subdirectory to mount the WIM file e.g. C:\work\mount

  • Copy one of the standard ConfigMgr boot images using:

    copy \\<server>\Reminst\SMSIMAGES\SMSPKG\<packageID>\boot.<packageID>.wim C:\work\dmscanner.wim

    e.g. copy \\labsccm1\Reminst\SMSIMAGES\SMSPKG\LAB00001\boot.LAB00001.wim C:\work\dmscanner.wim

  • Mount the WIM file to a temporary folder using:

    Dism /Mount-Wim /WimFile:C:\work\dmscanner.wim /index:1 /MountDir:C:\work\mount

  • Add the WinPE-HTA package to the WIM using:

    Dism /image:C:\work\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\WinPE-HTA.cab"

    Dism /image:C:\work\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\WinPE-HTA_en-us.cab"

  • Commit the changes to the WIM using:

    Dism /Unmount-Wim /MountDir:C:\work\mount /Commit

  • Copy the dmscanner.wim to a share on the ConfigMgr server and use the Add Boot Image wizard from the Boot Images node in the ConfigMgr console to add the custom boot image.

  • Distribute the new boot image to the appropriate SCCM PXE distribution points.

2. Create a DMScanner sofware package

  • Copy DMScanner.exe from C:\Program Files\ENGL\DriverManager\1.0\DMScanner\x86 to a folder on the ConfigMgr server

  • Create a vbscript named machineinfo.vbs in the same folder as dmscanner.exe with the following content:

    Dim objWMIService, objItem, colItems, env, strComputer
    
    strComputer = "."
    
    ' Create SCCM Task sequence environment object
    set env = CreateObject("Microsoft.SMS.TSEnvironment")
    
    ' WMI Connection to the object in the CIM namespace
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    
    ' Query WMI
    Set colItems = objWMIService.ExecQuery("Select manufacturer,model from Win32_ComputerSystem")
    
    ' Retrieve the machine manufacturer and model
    for each objItem in colItems
    env("MachineManu") = Chr(34) &  objItem.manufacturer & Chr(34)
    env("MachineModel") = Chr(34) &  objItem.model & Chr(34)
    next
    

  • Use the New Package wizard within the ConfigMgr Console to create a software package containing the files above with the following settings:

    Property Value
    Name DMScanner
    Version 1.0
    Manufacturer ENGL

  • Distribute the new software package to the appropriate SCCM PXE distribution points.

3. Create a DMScanner task sequence

  • Create a new custom task sequence named DMScanner.

  • Select the custom OSD Boot Image created in #1 above.

  • Edit the DMScanner task sequence and add the following items:

    TS Action Action Name Configuration Steps Package
    Restart Computer Boot to WinPE Select The boot image assigned to this task sequence
    Set a condition that allows the step to run if the task sequence variable _SMSTSInWinPE is false
    N/A
    Run Command Line Gather machine information Assign the package and set the command line to: cscript machineinfo.vbs

    ENGL DMScanner 1.0
    Connect to Network Folder Map S: drive Set a network path and assign the drive letter as S: and set the appropriate credentials

    N/A
    Run Command Line Scan Machine Assign the package and set the command line to:
    dmscanner.exe /unattend /scan:no-wmi /target:S:\dmscanner-%MachineManu%-%MachineModel%.xml
    ENGL DMScanner 1.0

4. Assign and Test the task sequence

  • Assign the DMScanner task sequence to the appropriate collection. This could be Unknown Computers or a custom collection that you create and import the new machine into.

  • PXE boot the new machine and the DMScanner task sequence will run. The output file will be saved on the network path specified as your S: drive and will be named based on the device manufacturer and model e.g. dmscanner-Dell-Latitude E6500.xml