To find your system’s model number in PowerShell, use the `Get-WmiObject` or `Get-CimInstance` cmdlets to retrieve hardware data directly. This is the simplest way to access the model without navigating GUI menus or manually digging through system files, and it works on all modern Windows versions. You’ll need elevated permissions (Run as Administrator) to access full hardware details, but standard users can still access the basic model number.
What You'll Need
- A Windows PC with PowerShell installed (built into Windows 10/11)
- Administrator permissions (for certain methods like WMI)
- A text editor or Notepad to view the output (optional)
Step-by-Step
- Open PowerShell as Administrator
Press Win + X and select Windows Terminal (Admin) or PowerShell (Admin). If prompted, confirm with your password. If this fails, try running PowerShell normally first, then right-click the icon and choose Run as administrator.
- Use WMI to retrieve the system model
Run this one-line command:
Get-WmiObject -Class Win32_ComputerSystem | Select-Object -ExpandProperty ModelReplace Model with Manufacturer and Name if the model isn’t returned directly.
Output will display the full system model (e.g., "HP EliteBook 850 G9").
- Alternative: CMD-style WMI query
For older systems or if WMI fails, use:
Get-CimInstance Win32_ComputerSystem | Select-Object ModelBoth methods work on Windows 7+; WMI is more reliable on Windows Server.
- Extract vendor-specific details
To list all hardware attributes (model, manufacturer, serial number), run:
Get-CimInstance Win32_ComputerSystemProductThis returns structured output like:
Name: "Model" Vendor: "HPE" Version: "1.0" - Verify for serial number (optional)
To get the unique hardware serial (e.g., for licensing), use:
Get-CimInstance Win32_BIOS | Select-Object SerialNumberGet-CimInstance Win32_TaskManager | Select-Object ProcessId(for task manager ID)
Common Mistakes
If the command returns blank or errors:
- Running PowerShell as non-admin: Use Run as administrator to access WMI, which requires elevated permissions.
- Typo in class name: Always use Win32_ComputerSystemProduct for vendor/model info.
- Outdated cmdlet: Update PowerShell with
winget install Microsoft.PowerShellif cmdlets like Get-CimInstance don’t appear. - Firewall blocking: Temporarily disable Windows Defender Firewall to test WMI access.
Tips
For a single-line snapshot of key hardware:
Get-CimInstance Win32_ComputerSystemProduct,Win32_BIOS | ForEach-Object { $_.Name } | Select-Object -First 2
Use PowerShell ISE (Integrated Script Editor) to format output neatly with:
Get-CimInstance Win32_ComputerSystemProduct | Format-Table -AutoSize
Always check the Model property first—most systems return it directly via WMI, so avoid manual file parsing.
Troubleshooting
If the command fails with "Access Denied":
- Re-run PowerShell as administrator and sign out/log back in.
- Add your user to the Local Administrators group via:
net localgroup administrators %username% /add - Use the Win32_OperatingSystem class as a backup:
Get-WmiObject Win32_OperatingSystem | Select-Object Caption
If WMI is unresponsive:
- Restart the computer and try again.
- Check if Windows Management Instrumentation service is running:
sc query WMIServiceIf paused, start it withsc start WMIService. - Launch PowerShell with -NoProfile flag:
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Get-CimInstance Win32_ComputerSystem"
Frequently Asked Questions
How do I find the model number if WMI fails?
Use the built-in Windows Registry or Task Manager:
- Open Task Manager (Ctrl+Shift+Esc), go to the Performance tab, and look under System for the model.
- Or edit the registry:
Run
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SystemRootto find the path, then append \system32\winsat\productid.exe to the value.
Can I get the model number from a USB stick?
No—only system-installed tools can access the model via WMI or registry. External devices cannot retrieve local system hardware data.
Why does my model number say "Unknown" for some attributes?
Some fields (like Version) may return blank if the hardware lacks a proper EFI/BIOS entry. Use Get-CimInstance Win32_BaseBoard for motherboard details. To force a fallback, try:
Get-WmiObject Win32_ComputerSystem | Select-Object Manufacturer, Model, Caption
How do I export the output to a file?
Use Out-File after piping:
Get-CimInstance Win32_ComputerSystemProduct | Select-Object Name, Vendor | Out-File "hardware_info.txt"
Why can’t I find the serial number?
The serial number is typically stored in the BIOS/firmware. WMI’s Win32_BIOS class often returns it, but some OEMs encrypt it. Try:
Get-CimInstance Win32_BIOS | Select-Object SerialNumber, Manufacturer
Get-WmiObject Win32_ComputerSystem | Select-Object SerialNumber
For workarounds, search for OEM-specific tools like Dell’s systeminfo.exe.
Does this work on Windows Server?
Yes—WMI and CIM (Common Information Model) are core to all Windows versions. Server 2008+ uses CIM commands, while Server 2003+ uses WMI. The commands above are compatible with all modern systems.