IT Consultant Everyday Notes

Just some problems/solutions storage

Tag Archives: SCCM

SCCM: Proper SQL Installation prior SCCM Setup

Great article from Steve Thompson!


SCCM: Replace Collection ID with Collection Name in report


One of my Customers asked me to create a customized report for his environment. A standard SCCM report for Software registered in Add or Removed Programs for a specific collection fit perfectly as a base, but I wanted to replace Collection information in the report (originally it is Collection ID, but I guessed the Customer would prefer a Collection Name).

My knowledge of SQL reporting is limited, but with help of Sherry Kissinger I ended up with the following result:

SELECT arp.DisplayName0, Count(Distinct arp.ResourceID) AS ‘Count’, arp.Publisher0, arp.Version0, col.collectionid, COL.Name as CollectionName
FROM fn_rbac_Add_Remove_Programs(@UserSIDs)  arp
JOIN fn_rbac_FullCollectionMembership(@UserSIDs)  fcm on arp.ResourceID=fcm.ResourceID
JOIN v_Collection COL ON fcm.CollectionID = COL.CollectionID
WHERE fcm.CollectionID = @CollID
GROUP BY DisplayName0, Publisher0, Version0, col.collectionid,
ORDER BY Publisher0, Version0

That gave me the report I looked for (of course Collection ID column can ber removed now and some other will be added):


SCCM: Boot image tuning

Johan published several boot image tuning tips allowing to avoid the following errors:

“Failed to find a valid network adapter”

“No Policies found”

How to set bigger logs: Understanding-logging-in-ConfigMgr-OS-Deployment

Add drivers to the boot image. Dell WinPE driver Pack is here: 11530.winpe-10-driver-pack


The article is here:

SCCM: Uninstall Software “en masse”


Jason Sandys published a nice script to uninstall all versions of a certain app:

SCCM: Windows 10 in-place upgrade Task Sequence improvements

MVP Johan Arwidmark published two things to change in standard SCCM CB Windows 10 in-place upgrade TS:

source is here

Adding Setup Upgrade Assessment and Driver support

As you probably know, ConfigMgr Current Branch has a built-in task sequence template for Windows 10 Inplace-Upgrades. This template is used for Windows 7/8/8.1 to Windows 10 upgrades as well as Windows 10 to Windows 10 upgrades (when a new build is available).
However, the default task sequence template for inplace upgrades are missing some useful features. This post shows you how to add them.

Adding Setup Upgrade Assessment and Driver support
The features I recommend adding to the Inplace-Upgrade task sequence is a setup upgrade assessment action, as well as support for injecting drivers.
1. Edit your Inplace-Upgrade task sequence, add an extra Upgrade Operating System action, configured it to continue on error, and rename it to Upgrade Assessment

Adding the upgrade assessment action.
The compatibility scan will always spit out a non-zero return code, for example 0xC1900210 which is the no issues found return code. The return code is set in a new read-only task sequence variable, the _SMSTSOSUpgradeActionReturnCode variable, and the reason for having a variable that, is so you can use it further down the line in the task sequence. The important thing is that even though Windows setup spits back a hexadecimal value, ConfigMgr reads it as a decimal value, so you need to do some conversion. For example 0xC1900210 in hex is 3247440400 in decimal.
2. Modify the Upgrade the Operating System group to use a task sequence variable as condition: Add _SMSTSOSUpgradeActionReturnCode, and set the value to 3247440400.

Configuring the Upgrade the Operating System group with a condition.
Next up is adding driver support, and in this example I had a Windows 10 driver package for a HP Elitebook 8560w.
3. In the Upgrade the Operating System group, add a new group named Drivers, and then use the new (for v1511) Download Package Content action to download the driver package. Also set a condition to only download the package if you’re deploying to that model.
4. Configure each Download Package Content action to save the path as a variable, in my case I used a custom path of C:\W10Drivers andW10Drivers as the variable

Adding Download Package Content actions with driver packages.
5. Finally, configure the Upgrade Operating System action to use the drivers by selecting Staged content to %W10Drivers01%.
Note: Don’t forget to add “01” to the end of the variable or it won’t work.

Windows 7: April 2016 Convenience Pack

How to integrate all post SP1 updates to your Win 7 SP1 media. Great time saver!

SCCM: List of SQL views you may need for SCCM CB (1602) custom reports

SCCM: SCCM CB–list of communication ports




Excel spreadsheet can be downloaded from:

SCCM: Downloading updates fails zero percent complete

From Steve Thompson’s blog:

Examined a server recently that refused to download deployed security updates. This server was also a Distribution Point in a remote location. Further, this site is running CM Current Branch read more

SCCM: Lenovo BIOS upgrade in SCCM TS

Bill Dunn published a nice post about the subj. Just in time for my next project! Thank you Bill.

From Bill Dunn’s post:

Lenovo BIOS Updates in the Task Sequence

The question popped up in a forum the other day about how people handle the upgrade of Lenovo BIOS in a Task Sequence.  There are several ways of course which can be handled, of variable sophistication.  Mikael Nystrom developed a solution for me several years back which I used for several years and enhanced on my own, in MDT Task Sequences.  However when my organization was shifting to SCCM Task Sequencing I was asked to develop something a bit lighter. The old solution kept all the BIOS update files in one very large (500MB+) package.  Clearly not the right solution in SCCM where every package used has to be downloaded from the DP during imaging. 
I moved to a much lighter solution for SCCM. 
Each BIOS revision is kept in its own container package (that’s what I call them anyway, a package with no assigned program, just used to hold content for use by something else).  Its basically the same idea as an SCCM Toolkit package, or Settings package.
Creating the BIOS packages:

  1. Go out to Lenovo and download the BIOS for each model for which you want to perform an upgrade during imaging.
  2. Extract the BIOS packages into a structure on your Package content share similar to:
  3. Use the Administrator Console to create one Legacy type package from each of these folders
    (using the example above you’ll end up with 3 packages)
  4. Distribute these packages

Task Sequence Changes:

  1. Someplace after the machine has booted into Windows for the first time place the steps to perform the BIOS upgrades.  Be sure that the you place them after the Use Toolkit and Gather steps. 
  2. Create a new TS Group for the BIOS Updates to nest under, it makes turning the BIOS updates off if needed easier and keeps the TS cleaner
  3. Under the BIOS Updates group create a Run Command Line step for Model to be upgraded
    • The command line in each case will be “Winuptp.exe /S” this is the BIOS update installer for all Lenovo Laptop models and is contained in every BIOS update.  The “/S” tells it to run quietly and automated with new GUI. It will also suppress rebooting. 
    • Add a condition on the step using a WMI query so this step will only run for the proper model
      select * from win32_computersystemproduct where version = “ThinkPad T430”
    • Add a reference to the proper BIOS Package for the model being updated buy this step.
      • I’ve found it easiest to create the step once the copy it for each model, updating the package reference and the name of the step to reflect the proper model
    • It s a good idea to place a reboot computer step soon after the BIOS updates complete.  Be sure to put Use Toolkit package and Gather steps immediately after the reboot.

    I have exported the BIOS Steps from my Production TS, you should be able to import this open the stub TS, then copy and paste the steps into your own TS.  The Package References will be broken, because I didn’t export the content.  My packages have naming and paths in them that I’d prefer not to expose.  You will only need to create the proper packages and update the references if you start with my stub.