USMT Estimates in SCCM Hardware Inventory

With our upgrade from Windows 7 to Windows 10 we have been faced with a few challenges.  One of them being our USMT solution to backup data from Windows 7 and restore it to Windows 10.  We have a few requirements here we need to meet:

  1. Data needs to be copied off of the machine completely.  We have decided to do a complete format and install on the machines instead of in place upgrade for various reasons.  (MBR to GPT,  clean new driver installs,  clean Windows 10 install).
  2. Needs to be completely automated.  No end user or technician intervention.
  3. Task sequence needs to be run in 100+ different locations.  USMT will need to be run and have ample storage space in all of these locations.

 

With these requirements in mind I decided to use the State Migration point role in ConfigMgr on all our distribution points.  Online USMT will be run during the task sequence kicked off from Windows 7.   Data will be copied off of machines and saved to a local SMP role on the distribution point in the local office.  To determine the amount of data on machines and the amount of space needed in each office I took the following steps.

Installing USMT and Custom XML Files

We got lucky with the installation and configuration of USMT on the existing Windows 7 computers.  We have an existing USMT5 install and custom xml files on the machines already.  If you do not have these things in place i suggest Installing USMT10 that is included in the Windows 10 ADK (https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit#winADK).  For us the existing USMT5 and XML files will work as we are only running estimates not the actual data copy from these binaries.

The custom XML we are useing is very basic and only grabs user data.  No application settings, OS settings ect.  You can get as granular as you want with your XML files.  I have used this guide to better understand how to configure our Custom.XML file.  (https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-customize-xml-files)

Running USMT Estimate and Saving Value to WMI

To run the USMT estimate I created a powershell script that runs the scansate.exe, parses the output XML, and writes the value into WMI for ConfigMgr hardware inventory to pickup later.  Big thanks to @Geodesicz for helping me grasp custom class and instance creation in WMI useing this method.

Link:  https://github.com/berendstm/USMTEstimate

Line 17,19,23,28,32 should be customized based on where you want to save the XML file with the USMT estimate information and where you have installed USMT.

To deploy the script we use a package that is run once a week on all Windows 7 machines.  It will update the value in WMI each time it runs.

Configuring SCCM Hardware Inventory

To configure SCCM to pickup this information from WMI you need to setup a new hardware inventory class.

Open the SCCM Console >  Administration > Client Settings and right click on the client settings that apply to machines that you want to collect the information from.

Select Hardware Inventory and click on “Set Classes” and then click “Add”

We want to connect to a machine where this script has run and connect to root\ITLocal

Select USMT_Estimate and select size and computer name.

Reporting on USMT Estimation

You can use the following query to build a very simple report that will bring back USMT Estimate sizes, computer names, managed by field, and AD sites.  This is a simple report that could be expanded on.

select  all SMS_R_System.Name0,SMS_R_System.managedBy0,SMS_G_System_USMT_ESTIMATE.Size00,SMS_G_System_USMT_ESTIMATE.TimeKey,SMS_R_System.extensionAttribute10 from vSMS_R_System AS SMS_R_System INNER JOIN USMT_ESTIMATE_DATA AS SMS_G_System_USMT_ESTIMATE ON SMS_G_System_USMT_ESTIMATE.MachineID = SMS_R_System.ItemKey   where SMS_G_System_USMT_ESTIMATE.Size00 > N’0′

The output will look like this and let you sort and filter by site, computer, user ect.

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *