WMI Query Machine Model: Find the Make and Model of a Device

Get a PC's manufacturer, model and serial number with PowerShell now WMIC is gone, query remote machines and use the values in SCCM.

WMI Query Machine Model: Find the Make and Model of a Device

Knowing the exact make and model of a machine is useful in all sorts of situations: picking the right driver pack in an OSD task sequence, targeting a BIOS update, building an SCCM or Intune collection, or just filling in a support ticket. Windows stores this information in WMI (Windows Management Instrumentation), and you can read it in a couple of seconds from the command line or PowerShell. This guide shows the commands that work on current Windows 11, Windows 10 and Windows Server releases, how to query remote machines, and how to use the results in ConfigMgr.

A quick word on WMIC

Older guides, including the original version of this one, used wmic computersystem get model. Microsoft has now removed the WMIC tool: it was turned off by default in Windows 11 24H2 and is removed on Windows 11 25H2 and when upgrading to it. WMI itself is not going anywhere, only the old command-line front end, so the answer is to use PowerShell instead. Any scripts or batch files still calling wmic should be updated; our guide to replacing old batch files with PowerShell covers the common conversions.

Get the make and model with PowerShell

Open PowerShell (no admin rights needed) and run:

Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Manufacturer, Model

You will get output like:

Manufacturer Model
------------ -----
Dell Inc.    Latitude 5440

If you need it from a Command Prompt or an old batch file, call PowerShell inline:

powershell -NoProfile -Command "(Get-CimInstance Win32_ComputerSystem).Model"

Lenovo machines: why the model looks like a code

On Lenovo devices, Win32_ComputerSystem.Model returns the machine type, such as 21HDS0X200, rather than a friendly name. The friendly name, for example ThinkPad T14 Gen 4, is in a different class:

Get-CimInstance -ClassName Win32_ComputerSystemProduct | Select-Object Vendor, Name, Version

On Lenovo, Version holds the friendly name and Name holds the machine type. On Dell and HP, Name usually matches the model. Bear this in mind when you write driver or BIOS conditions, and see our guide on updating a Lenovo BIOS with SCCM for a worked example.

Serial number and asset tag

For warranty lookups and asset records you usually need the serial number as well. That lives in Win32_BIOS:

Get-CimInstance -ClassName Win32_BIOS | Select-Object SerialNumber, SMBIOSBIOSVersion

If an asset tag has been set in the BIOS or UEFI, you can read it from Win32_SystemEnclosure:

Get-CimInstance -ClassName Win32_SystemEnclosure | Select-Object SMBIOSAssetTag, ChassisTypes

Many machines come back with a blank asset tag unless your organisation or the OEM has set one. The ChassisTypes value tells you whether it is a laptop, desktop or something else; our SCCM chassis types reference lists what each number means.

Querying remote computers

Get-CimInstance can query other machines over WinRM, which is enabled by default on Windows Server and on most managed domain clients:

Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName PC001, PC002, PC003 |
    Select-Object PSComputerName, Manufacturer, Model

To build a quick inventory from a list of names and save it to CSV:

Get-Content .\computers.txt | ForEach-Object {
    $cs  = Get-CimInstance Win32_ComputerSystem -ComputerName $_ -ErrorAction SilentlyContinue
    $bio = Get-CimInstance Win32_BIOS -ComputerName $_ -ErrorAction SilentlyContinue
    [pscustomobject]@{
        Computer     = $_
        Manufacturer = $cs.Manufacturer
        Model        = $cs.Model
        Serial       = $bio.SerialNumber
    }
} | Export-Csv .\inventory.csv -NoTypeInformation

Our guide to building reports from PowerShell shows how to turn this into an HTML report or email it on a schedule.

Other quick ways to check

  • System Information: run msinfo32 and look at System Manufacturer and System Model.
  • Settings: on Windows 11, Settings > System > About shows the device name and, on most OEM machines, the model at the top.
  • systeminfo: running systeminfo | findstr /i "System Manufacturer Model" in Command Prompt works without WMIC.

Using make and model in ConfigMgr

Task sequences. ConfigMgr already reads these values for you. The built-in task sequence variables _SMSTSMake and _SMSTSModel are populated at the start of the sequence, so you can use them in step conditions without a custom script. If you prefer a WMI condition on a step or group, use a query like:

SELECT * FROM Win32_ComputerSystem WHERE Model LIKE "%Latitude 5440%"

Collections. Hardware inventory stores the same data in the SMS_G_System_COMPUTER_SYSTEM class, so a device collection for one model looks like this:

select SMS_R_System.ResourceId, SMS_R_System.Name from SMS_R_System
inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId
where SMS_G_System_COMPUTER_SYSTEM.Model like "%Latitude 5440%"

Reports. For a count of every model in the estate, see our SQL queries for device make, model and architecture, and the SCCM SQL and WQL query library has many more ready to copy.

FAQ

Do I need admin rights to read the model?

No. Reading Win32_ComputerSystem and Win32_BIOS works as a standard user on the local machine. Querying remote machines needs an account with rights on those machines.

What replaced WMIC?

PowerShell’s CIM cmdlets, mainly Get-CimInstance. They query exactly the same WMI classes, so the values are identical.

Why does a virtual machine show “Virtual Machine” as the model?

Hyper-V, VMware and other hypervisors report their own manufacturer and model strings. That is expected and is a handy way to spot VMs in a collection query.

Resources

🛠️

Gear We Recommend

A few general tech accessories worth having alongside this.

Browse our General Tech Accessories picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.

Next step

Free toolWMI Rebuilder Fix


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Intune, Active Directory, PowerShell and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published 770+ practical guides to real-world IT problems. He also builds free Windows utilities, including Ultimate Settings Panel, which has been downloaded over 850,000 times.

Part of The Geek Network