When you build a task sequence in SCCM and MDT you can use WMI queries to run steps for specific computer models. This is especially useful when installing driver packages or BIOS updates. Here is an example of a WMI query to detect only Surface Pro 4 devices:
SELECT * FROM Win32_ComputerSystem WHERE Model Like “%Surface Pro 4%”
Here are 2 methods to query WMI and find the model name for any computer.
- From the computer, run this PowerShell command: Get-WmiObject Win32_ComputerSystem
- From a command prompt, run this WMIC command: wmic csproduct get name
Yunar - Hi Todd,
Thank you. I found it is very useful to run command in local machine “Get-WmiObject Win32_ComputerSystem”
How to get the same information for remote machine?
Todd - Hey, you can run on remote computer by using the -ComputerName parameter. See the below command…replace MyPCName with the remote computer name.
Get-WmiObject Win32_ComputerSystem -ComputerName MyPCName
Yunar - Excellent, it works. Thanks a lot.
Todd - Happy to help!