IT Toolbox
Menu
PowerShell · Windows

Generate a quick inventory of a Windows PC

Shows the computer model, serial number, Windows version, processor, memory, and disks.

Low risk

Command

$Computer = Get-CimInstance Win32_ComputerSystem $BIOS = Get-CimInstance Win32_BIOS $OS = Get-CimInstance Win32_OperatingSystem $CPU = Get-CimInstance Win32_Processor | Select-Object -First 1 [PSCustomObject]@{ Nom = $env:COMPUTERNAME Fabricant = $Computer.Manufacturer Modele = $Computer.Model NumeroSerie = $BIOS.SerialNumber Windows = $OS.Caption Version = $OS.Version Processeur = $CPU.Name RAM_Go = [math]::Round($Computer.TotalPhysicalMemory / 1GB, 1) } Get-Volume | Where-Object DriveLetter | Select-Object DriveLetter, FileSystemLabel, @{N='Taille_Go';E={[math]::Round($_.Size/1GB,1)}}, @{N='Libre_Go';E={[math]::Round($_.SizeRemaining/1GB,1)}}

When to use it

Useful for an audit, workstation replacement preparation, or an intervention report.

How it works

  • Get-CimInstance queries local hardware and operating-system information.
  • The result can be copied or exported with Export-Csv.

Precautions

  • Some virtual machines or BIOS implementations may return a generic serial number.

Rollback

No changes are made to the system.

Support the development of BAOI Hosting, domains and new IT resources.
❤️ Support BAOI