Get-ComputerInfo
Use Get-ComputerInfo to return a single object with over a hundred properties describing the operating system and hardware.
Documentation: Microsoft Learn — Get-ComputerInfo
Syntax
See the command anatomy
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Get-ComputerInfo [[-Property] <string[]>] [<CommonParameters>]- Stage 1Get-ComputerInfo
-Property
Try it
PowerShell example · browser support is limited.
Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.
Follow the objects
Run the command to inspect each stage.
Examples
Get-ComputerInfo -Property OsName
Show reference output
Sample output · fictional data, shaped like the real thing
OsName OsVersion CsTotalPhysicalMemory ------ --------- --------------------- Microsoft Windows 11 Pro 10.0.26100 34319476736
Get-ComputerInfo -Property Cs*
Show reference output
Sample output · fictional data, shaped like the real thing
OsName OsVersion CsTotalPhysicalMemory ------ --------- --------------------- Microsoft Windows 11 Pro 10.0.26100 34319476736
Select Caption, Version, LastBootUpTime
Show reference output
Sample output · fictional data, shaped like the real thing
Caption Version LastBootUpTime ------- ------- -------------- Microsoft Windows 11 Pro 10.0.26100 9/8/2026 6:15:04 AM
Parameters
Parameter definitions:
-Property
Practical use and troubleshooting
Practical scenario: Use Get-ComputerInfo when you need to return a single object with over a hundred properties describing the operating system and hardware. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.
Common error and fix: Blank properties can be unavailable on that OS or environment. Check one property and its provider separately rather than interpreting every missing value as collection failure. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.
See also: Get-CimInstance. Get-ComputerInfo collects a broad computer summary; Get-CimInstance can query one specific class. Prefer a narrow query when a report needs only a small number of properties. Read the linked command before substituting it; similar names do not imply identical inputs or output.
Recap
Get-ComputerInfo Use Get-ComputerInfo to return a single object with over a hundred properties describing the operating system and hardware.
Next: Get-Item