PowerShell/CIM: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 11: | Line 11: | ||
ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic | ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic | ||
== Motherboard == | |||
Get-CimInstance Win32_BaseBoard | |||
Get-CimInstance Win32_BaseBoard | Format-List Product,Manufacturer,SerialNumber,Version | |||
== CPU == | |||
Get-CimInstance -ClassName Win32_Processor | |||
Get-CimInstance -ClassName Win32_Processor | Format-List Name | |||
== Video Card == | |||
VRAM: <ref>https://superuser.com/questions/1461858/fetch-correct-vram-for-gpu-via-command-line-on-windows</ref> | |||
$1 = (Get-CimInstance Win32_VideoController | Select-Object -ExpandProperty AdapterRam)/1GB | |||
[math]::round($qwMemorySize/1GB) | |||
Appears to still be limited to 32bit (4GB) limitation | |||
== keywords == | |||
Latest revision as of 09:53, 16 November 2025
PowerShell CIM
WMIC and WMI Deprecation
WMIC is deprecated, in favor of PowerShell WMI which was deprecated in favor of PowerShell CMI ! (warning from "wmic /?")
This utility is superseded by Windows PowerShell for WMI; see Chapter 7 - Working with WMI. https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/07-working-with-wmi?view=powershell-7.4
See Windows/wmic and PowerShell/WMI
ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic
Motherboard
Get-CimInstance Win32_BaseBoard
Get-CimInstance Win32_BaseBoard | Format-List Product,Manufacturer,SerialNumber,Version
CPU
Get-CimInstance -ClassName Win32_Processor
Get-CimInstance -ClassName Win32_Processor | Format-List Name
Video Card
VRAM: [1]
$1 = (Get-CimInstance Win32_VideoController | Select-Object -ExpandProperty AdapterRam)/1GB [math]::round($qwMemorySize/1GB)
Appears to still be limited to 32bit (4GB) limitation