Coffee_muff Posted October 25, 2021 Report post Posted October 25, 2021 Hello All, I am working on a TaskSequence for a client where client wats to add a step in task sequence to show a warning for an unsupported hardware. I have added a query to eg:- Select * FROM Win32_ComputerSystem WHERE Model Like"%Latitude 7070%" if true then execute TS. I am not sure how to add the Error\Warning, I need it to look like the screenshot below and then it should end the TS. Quote Share this post Link to post Share on other sites More sharing options...
0 radish Posted October 28, 2021 Report post Posted October 28, 2021 $model=(Get-WmiObject Win32_ComputerSystem | Where-Object {$_.Model -like "*Latitude 7070*"}).model if($model -match 'Latitude 7070'){}else{ $TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment $TSProgressUI = new-object -comobject Microsoft.SMS.TSProgressUI $TSProgressUI.CloseProgressDialog() $a = new-object -comobject wscript.shell $intAnswer = $a.popup("The current computer hardware does not match ",0,'computer',16) #first number is timeout, second is display. } Add a running script step in the task sequence, use this command to pop up a gui notification message Quote Share this post Link to post Share on other sites More sharing options...
Hello All,
I am working on a TaskSequence for a client where client wats to add a step in task sequence to show a warning for an unsupported hardware.
I have added a query to eg:- Select * FROM Win32_ComputerSystem WHERE Model Like"%Latitude 7070%" if true then execute TS.
I am not sure how to add the Error\Warning, I need it to look like the screenshot below and then it should end the TS.
Share this post
Link to post
Share on other sites