Skip to content

Instantly share code, notes, and snippets.

@Samk13
Last active November 24, 2023 23:39
Show Gist options
  • Save Samk13/09980198de8502bae6cedfac246aec1a to your computer and use it in GitHub Desktop.
Save Samk13/09980198de8502bae6cedfac246aec1a to your computer and use it in GitHub Desktop.
PowerShell commands
# Get motherboard model
Get-WmiObject win32_baseboard | Select-Object -Property Product
# Get the maximun capacity of the MB RAM in GB
Get-WmiObject -Class Win32_PhysicalMemoryArray | Select-Object -Property @{Name="MaxCapacityGB";Expression={$_.MaxCapacity / 1MB}}
# Get the current RAM installed
Get-WmiObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | Select-Object @{Name="TotalGB"; Expression={ $_.Sum / 1GB }}
# Get list of connected storage devices
Get-PhysicalDisk | Select-Object MediaType, BusType, Model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment