WaaS–Post 1–PreCache Compat Scan TS

So this will be the first of several posts, well, it’s sorta the second, this heavily relies on the Script I posted for writing values to registry & WMI a few posts ago, however I’ve made several modifications to it since then, and have done A LOT of testing. Hence my last post about testing Low Disk Space machines.

WaaS Process, as Designed by Mike Terrill & Keith Garner quick overview:

  1. PreAssessment:  Set of Rules run against hardware inventory data to rule out machines that be known to fail the upgrade. Rules include:
    1. Hardware Checks
      1. Models
      2. Free Disk Space
      3. Memory
    2. Software Checks (Software we know that needs to be at specific versions to survive IPU, or not block it)
      1. 3rd Party Encryption Version level
      2. 3rd Party AV Version level
      3. Several other Apps
    3. General Checks
      1. Last HWInv Date
      2. Last MP Checkin
      3. OS / Build / OS Arch
      4. CCM Cache Size
  2. PreCache / Compat Scan (Task Sequence): After it passes all of the rules, the computer then added to a collection targeted with this TS.  The TS is setup as a Required Deployment, and set to Pre-Download Content, and Download all Content before starting the TS.  Then will dynamically download the driver packages, run the Check Readiness, and then Compat Scan.
  3. Schedule for Upgrade: After it has been cached, and passes the compat scan, the machines can be schedule (added to collection targed with the upgrade).

That’s a really quick overview of how we’ve setup WaaS, we went over this in great detail @ MMS, and I’d expect Mike Terrill to eventually blog that detail, I just don’t want to steal all of this thunder, but felt you needed a little overview to explain where this TS fits in.

This post will be covering PreCaching your Upgrade Media and Drivers, along with running the Compatibility Scan.

Here is what the TS looks like:
image

So Lets break this down:

  • Set SMSTSPersistContent & Set SMSTSPerserveContent – Set both to true so that when you download the packages for the TS, it saves it to the CCMCache so it doesn’t remove after the TS Completes.
    image
    image
  • Set OSD Info Type & Set OS Build Version.  Variables used in scripts and steps later on.
    image
    image
  • Set WaaS_Stage (Sets registry Key, Eventually I want to go back and make this write to WMI as well, just haven’t had time)
    image
  • Set TS Var – Sets SMSTS_StartTSTime to the current time, to be used to calculate how long the TS ran.
    image
  • Power Settings Change – Details HERE
    • Set TS Var “PowerPlan” to Active Power Plan – This is grabbing the current power plan running and places that info into a variable
    • Set Power Options – High Performance – Sets the machine to High Performance power plan, to hopefully speed up the process
  • Set Driver and Content Download (Group)
    • Set Dynamic Variables (Model & Package)  This is a simple way to map Models to Packages of Drivers.
      image
    • Download Drivers and Content (Group)
      • Set Download Start Time
        image
      • Set SMSTSDownloadProgram to Null
        image
      • Set Driver Download Variables
        image
      • Download Driver Package
        image
      • Reset Download Variables
        image
      • Set Download Finish Time
        image
  • Storage Cleanup (Group) Runs if Free Space < 20GB Free – Not going to go into in this post
  • Check Readiness (RAM & Free Space)
    • Set CheckReadiness Pass (sets variable to “Pass”) by default, if an upcoming step fails, it updates
      image
    • Check Readiness – Memory
      image
    • Set CheckReadiness PHail Memory (If last step fails, it sets CheckReadiness to “Memory”
      image image
    • Check Readiness – Free Space
      image
    • Set CheckReadiness PHail Free Space (if last step fails, it sets CheckReadiness to “FreeSpace”
      image image
  • Compatibility  Scan Section (Group) – Runs if CheckReadiness = Pass
    image

    • Add Key to remove from Provisioning Mode – Creates run once key with command to remove from provisioning mode (safe guard)
      image
    • Set Start Upgrade Time
      image
    • OS Compat Scan – Upgrade Step set to Compat Scan Only
      image
    • Set Finish Upgrade Time
      image
    • Delete Key to remove from Provisioning mode
      image
  • Power Settings Restore
    • Set Power Options – Balanced (Runs if PowerPlan = Balanced)
    • Set Power Options – Power saver (Runs if PowerPlan = Power saver)
  • Set TS Finish Time
    image
  • Tweak – SetOSDInfo PS – Runs the script that writes all of the metrics to WMI & Registry
    image
  • Send Hardware Inventory
    image
  • Copy Logs to Server (if CompatScan was not successful)
    image
  • PHail Section
    • Set TS Var ReturnErrorCode” – Setup No Run – The will set the Variable ReturnErrorCode to 20 (arbitrary number that is not 0) if compatscan never ran
      image image
    • Set TS Var “ReturnErrorCode” – Setup Ran – This will set the ReturnErrorCode to the Return Code of the CompatScan
      imageimage
    • PHail if CompatScan PHailed
      image
      image

 

And there you have it, the PreCache Compat Scan TS
Sorry, all of the steps are just images, but the actual TS is available for download HERE

Deployment

General: Defaults.  You might be asking, why not use the "Pre-Download Content..." option, well, that only comes into play if the deployment is "Available" vs "Required".  Since it is a required Deployment, it will start to download right away anyway.  If you're making the TS "Available" to a group for testing, it would probably be worth checking that box.

Scheduling:  We have it set to run each day @ 8PM.  Once it runs successfully we have it automatically move to the next collection, if it fails, it will just try again the next night, hopefully you've remediated anything that prevented it from running properly.  Change the schedule to fit your environment.  In my lab, this works fine, as I have collection queries move it out once it is successful. That's another blog post down the road.

User Experience... HIDDEN... we don't want the users to even know this is going on.

Distribution Points: Download all content locally before starting the task sequence.  Question: How long do we want the TS to run??  Answer: As short as possible.  Pre-Download all content also ensures that we have all of the content needed before starting.  If it can't get the content it doesn't start.  Less chance of failure during the actual TS.  Consider this, you have a remote user with little bandwidth, it will take hours for the content to download, if you didn't have it download the content ahead of time, that TS would run for hours, with a high change of the user rebooting, or turning off the machine in the middle of the TS.  Anyway, I think you get the point, download the content prior to starting the TS.

 

Example of Results (Fail Low Free Disk Space)
image

Example of Results (SUCCESS!)

image
Note, if you look at these metrics, you’ll be like… wait a minute, how was your Task Sequence run time less than the time it took to download the drivers.  Well, it downloaded the Drivers in Run 1, which then failed the Free Space Rule.  During Run 2, it had already downloaded the drivers, so it didn’t need to waste those 4 minutes again, and so the entire 2nd run only took 3 minutes.  The Script to capture this info, writes the time it took to download drivers, the 2nd time you run it, it checks that key, if it’s greater than 0, it will leave it alone, and keep the current value from the last run.

 

The Content needed for my IPU is now in my CCM Cache, which will make the IPU start instantly, no need to wait for the download. (Upgrade, Drivers & Scripts Packages)
image

If you need any clarifications on this post, please let me know and I'll try to update it.  When you work on these things every day, it's easy to miss explaining something.

Originally Posted on GARYTOWN.COM – 2018.06.05

10 thoughts on “WaaS–Post 1–PreCache Compat Scan TS

  • June 6, 2018 at 12:16 pm
    Permalink

    I am starting to deploy IPU, and wanted to check the clients before deploying....So i will need some time to create a TS and test it.
    Can you please post links if you have for "Copy Logs to Server" i think i have seen it in your blog. And also currions what are the queries to move from collection to a collection.
    Do you use any reports to review the "Check Readiness TS" from the night before?
    Thank you.

    Reply
  • June 6, 2018 at 12:20 pm
    Permalink

    Sorry, i jumped the gun. Found the scripts in the zipped file.
    Thanks again.

    Reply
  • June 6, 2018 at 1:22 pm
    Permalink

    Looking at your TS i am still missing where are you passing a parameter to a "Copy-LogsToArchive.ps1" i dont see it in the script and nothing in the TS: -LogID "IPU\%SMSTS_Build%\%ComputerName%"
    Thanks,

    Reply
    • June 8, 2018 at 11:28 am
      Permalink

      Looking at the script and the parameter defaults I think it's just crossed wires.

      The %SMSTS_Build% in the Parameters field looks like it would match up with the variable %osbuildversion% being set at the start of the sequence.

      The %ComputerName% variable is simply the computer's name. So that can be assigned any number of ways ($env:ComputerName for example). Or you could use one of the native SCCM TS variables for the computer name.

      Reply
  • June 8, 2018 at 11:30 am
    Permalink

    Gary, this is rock solid! I'm learning a great deal going through this. I keep finding myself saying, "Why didn't I think of that?"

    Great work!

    Reply
  • June 14, 2018 at 8:52 am
    Permalink

    Hi,
    Thank you for this good post, it helps manage the upgrade process in a more streamlined manner for us.
    Just a small question, for the Dynamic variable for driver package you use
    OSDDownloadDestinationVariable to DRIVERS but when I see where the drivers are downloaded its with a folder name with random letter ex: a / f / e..
    I was hoping to download the drivers to c:\windows\CCMcache\Drivers location so I can use this location during my IPU TS.

    Is it possible to make this change in your TS? or any where in the script if so could you let me know . thanks!

    Reply
    • June 14, 2018 at 9:37 am
      Permalink

      Basically, you run the exact same group in your actual upgrade TS, so it will try to download again, (but sees it already has the content and doesn't need to download again), then creates that variable DRIVERS again, which you'd use. I'll cover that in my next post... as soon as I get time to post it.

      Reply
      • June 15, 2018 at 3:28 am
        Permalink

        Thank you for the quick response. So I will just use the DRIVERS variable under Upgrade Operating system under staged Content for Drivers during windows setup option. I think this should work.
        Thank you again.

        Reply

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.