Display Message in SCCM Task Sequence Unsupported Hardware Model

In this post, you will learn to display the prompt message in SCCM Task Sequence unsupported hardware model. This would be helpful for SCCM admins to allow only certified models for operating system deployment to provide the best user experience and secure environment. In case within an organization, if anyone attempts to run the task sequence apart from the approved listed models, they will be aware with the prompt message.

To avoid unnecessary deployment time, it’s best to prompt messages for an unsupported hardware model at the beginning of task sequence execution. The concept here’s to run a generic script to prompt a message states the computer model is not supported in case the driver package for the model is not added for deployment.

Is it best to check the supported hardware with the Run command line in the task sequence? This is a quick way to notify. Else you can also use the configuration baseline that part we will try to explore later. There will be some scenarios that need end-user interaction with the Intune process. You will see more details in the post on using ServiceUI with Intune to bring System Process to Interactive Mode while deploying an application.

Patch My PC

Download ServiceUI – SCCM Task Sequence Unsupported Hardware Model

ServiceUI is an executable that comes with the Microsoft deployment toolkit. ServiceUI can detect the user session and allow user interaction. To get the ServiceUI executable, you need to download Microsoft Deployment Toolkit (MDT) from Microsoft Download Center and install it on your client machine.

Once MDT is installed, you can locate ServiceUI in MDT Installed directory. You need to use the version of serviceUI.exe with the same architecture as the boot image that you are deploying to ignore any issues. For Example – You can see it’s located in the below path. The syntax is shown below –

<MDT Installed Drive>\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Tools\x64\ServiceUI.exe"
ServiceUI - Prompt Message for Unsupported Hardware Model in SCCM Task Sequence
ServiceUI – SCCM Task Sequence Unsupported Hardware Model

Prepare Scripts – SCCM Task Sequence Unsupported Hardware Model Prompt Message

Next, you need to prepare a PowerShell script to prompt the user the hardware model is not supported, based on your requirements you can add more to the script to perform all the necessary actions. Here’s a sample script, Please test it before executing to the production environment

1E Nomad
  • Copy the ServiceUI.exe to your package source file folder.
  • Open Notepad, Or PowerShell ISE on your device. Copy and paste the below line, Save it as FileName.ps1 to appropriate location –
function New-PopupMessage {

Add-Type -AssemblyName System.Windows.Forms

[System.Windows.Forms.MessageBox]::Show('This Computer model is not supported. IT Help is Nearer! For more information, please contact your system administrator.', 'Computer Hardware - Not Supported', 'Ok', 'Stop')

}

#Close the Task Sequence Progress Bar to appear the prompt message for unsupported hardware model 

try
{
$TSProgressUI = new-object -comobject Microsoft.SMS.TSProgressUI
$TSProgressUI.CloseProgressDialog()
}
Catch{}
#Run the function
New-PopupMessage

Create Package in SCCM

The next step is to create a package in Configuration Manager to prompt messages in SCCM Task Sequence Unsupported Hardware Model. Let’s get started –

  • In the Configuration Manager console, Go to the Software Library workspace, expand Application Management, Right-click Packages and select Create Package.
SCCM Console – Create Package
SCCM Console – Create Package

On the Package page, Specify the following information and click Next.

  • Name: Specify a name for the package.
  • Description: Specify a description for this package.
  • Source folder: Choose to Browse to select the UNC path and then specify the location of the source files for the package.
SCCM Package - Specify Source file | Prompt Message for SCCM Task Sequence Unsupported Hardware Model
SCCM Package – Specify Source file | Prompt Message for SCCM Task Sequence Unsupported Hardware Model

On the Program Type, Choose the type of program Do not create a program. Click Next.

SCCM Package – Do not Create a program
SCCM Package – Do not Create a program | SCCM Task Sequence Unsupported Hardware Model
  • Review the settings, click Next.
  • The Package creation process was completed successfully. Click Close to complete the wizard.
SCCM – The task Create Package and Program Wizard completed successfully
SCCM – The task Create Package and Program Wizard completed successfully

The Created package now appears in the Packages node of the Configuration Manager console. You’ve finished creating a package.

SCCM Task Sequence Unsupported Hardware Model
Package Created – SCCM Task Sequence Unsupported Hardware Model

Important – You must distribute the content to the distribution point. Right-click on package and click Distribute Content. Select the distribution point or groups where you want to distribute this package.

Deploy SCCM Task Sequence

Let’s follow the steps to add the package to SCCM Task Sequence –

Create or Edit an Existing Task Sequence

This guide will help you to create a Configuration Manager task sequence from scratch. Use the following steps to modify an existing task sequence –

Customize Task Sequence

  • In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and then select the Task Sequences node.
  • In the Task Sequence list, select the task sequence that you want to edit. Select Edit to modify.
SCCM Task Sequence Unsupported Hardware Model
Edit – SCCM Task Sequence Unsupported Hardware Model

Based on your business requirements In the Task Sequence steps, You can set up WMI queries – All WMI queries are under “If Any the conditions is true:” or “If none of the conditions is true:”

You can add Run Command Line, PowerShell Script options based on the script you had. Learn more about how to add the Run Command Line step to SCCM Task Sequence. We will add the following steps to the task sequence –

Run Command Line – To add this step in the task sequence editor, select Add, select General and select Run Command Line.

SCCM Task Sequence – Add > General > Run Command Line
Add > General > Run Command Line | SCCM Task Sequence Unsupported Hardware Model
  • On the Properties tab for this step, configure the settings described in this section. Specifies the command line that the task sequence runs.
ServiceUI.exe -process:TSProgressUI.exe %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Noprofile -WindowStyle Hidden -executionpolicy bypass -File FileName.ps1
  • Package – Select this option to specify the Configuration Manager package that contains the necessary files for execution.
Display Message in SCCM Task Sequence Unsupported Hardware Model 1
Run Command Line Step – SCCM Task Sequence Unsupported Hardware Model

In this scenario, I will add the condition if the computer hardware is not supported for deployment. It will prompt a message to users, or the supported models task sequence will continue without prompt.

On the Run Command Line step, Options tab. Add Condition – Query WMI Select * from Win32_ComputerSystem where Model like ‘Latitude 5420%’

Display Message in SCCM Task Sequence Unsupported Hardware Model 2
Add WMI Condition – SCCM Task Sequence Unsupported Hardware Model

Similarly, you can add device models that are supported or not supported based on your task sequence conditions. You can check more detailed steps to create the WMI conditions.

Review other settings added in Task Sequence, make sure to apply all changes. Click Apply and OK, close the window.

Select the task sequence and target the Deployment to Collections. You can refer to Easy Guide to Deploy Windows 10 21H1 Using SCCM Task Sequence | ConfigMgr | Step by Step

End Users Experience

On Target Computers, it depends on deployment settings. You will be presented with the Welcome to the Task Sequence Wizard.

Complete the Task Sequence Wizard by selecting deployed task sequence. Click Next. Once you complete the Wizard, the deployment begins and the user will get the below prompt in case of the hardware model you added is not supported. 

Display Message in SCCM Task Sequence Unsupported Hardware Model 3
Prompt Message – SCCM Task Sequence Unsupported Hardware Model

If you have a different experience or approach and want to share it with us. You are always welcome to comment in the post below to help the community with your wide experience.

Author

About Author -> Jitesh has over 5 years of working experience in the IT Industry. He writes and shares his experiences related to Microsoft device management technologies and IT Infrastructure management. His primary focus area is Windows 10 Deployment solution with Configuration Manager, Microsoft Deployment Toolkit (MDT), and Microsoft Intune.

4 thoughts on “Display Message in SCCM Task Sequence Unsupported Hardware Model”

  1. Just a few things
    Shouldn’t that prompt occur prior to rebooting the machine into WinPE so users know its not supported and save some time and confusion. Also, if the user hits okay, I assume it just continues as there is no error code thrown to SCCM to crash the process, am I right and is this the intention?

    Reply
    • Hello, You can change the order! If you need, You can terminate the task sequence process after displaying the message. Since it’s a custom prompt we can’t generate random error code, Good to have Warning/Error as a message to provide users with insight deploying task sequence could be risky! You can customize the prompt or message based on your requirements.

      Reply
  2. Hey Jitesh, Thank you for this post.
    Here you have taken the Non-Supported models to add, we cannot do it as we are not sure which model will anyone try to build as due to global chip shortage they are ordering any model available with vendor.
    Hence I want to put supported models with wmi query and any model that is not there should throw that error. SO will there be any changes required in the script as well ?
    please suggest.

    Reply
    • Hi, Appreciate your inputs! In the scenario, we have taken as an example to demonstrate how we can prompt messages for users during task sequence execution. Based on your requirements you can customize the WMI query added to Task Sequence step as well as the prompt message! The script is generic, which doesn’t check the models it has been used to display messages. As I mentioned in a previous comment to one of our community member, If you need to have the script to stop the task sequence execution after displaying the warning\error message, You can customize it accordingly.

      Reply

Leave a Comment

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