Spring til indhold

PowerShell how to use

How to Retrieve System Information in PowerShell

PowerShell is a powerful built-in tool in Windows that allows you to quickly fetch detailed information about your computer’s hardware, operating system, and network.

Basic Step-by-Step:

  1. Click the Start button, type PowerShell, right-click the result, and select Run as Administrator.
  2. Type the following command and press Enter:
    Get-ComputerInfo

This command outputs hundreds of details, including OS build, BIOS version, processor, and system architecture.


💡 Tips for Better Usage

  • Filter the results: If you only need specific information (like the Windows version), you can use the -Property parameter combined with wildcards (*):
    Get-ComputerInfo -Property "Os*"
  • Export to a file: To save the massive list of specs to a text file for later use, use the redirection operator (>):
    Get-ComputerInfo > C:\Temp\SystemInfo.txt
  • Target specific hardware (CIM): For quick hardware checks without the overwhelming amount of OS details, use the Get-CimInstance cmdlet. For example, to check your processor model:
    Get-CimInstance Win32_Processor | Select-Object Name
  • Support information:
    Get-ComputerInfo | Select-Object CsManufacturer, CsSystemFamily, CsModel, CsName, BiosManufacturer,BiosSeralNumber, BiosBIOSVersion, OsName, OsVersion, OsDisplayVersion, OsBuildNumber > C:\Temp\SupportInfo.txt

For more in-depth learning about system cmdlets, you can explore the official Microsoft Get-ComputerInfo Documentation.