PowerShell/WMI: Difference between revisions

From Omnia
Jump to navigation Jump to search
 
Line 19: Line 19:


  Get-WmiObject Win32_BaseBoard | Format-Table -AutoSize Manufacturer,Product,SerialNumber,Version
  Get-WmiObject Win32_BaseBoard | Format-Table -AutoSize Manufacturer,Product,SerialNumber,Version
== processor ==
<pre>
PS C:\> Get-WmiObject win32_processor | Format-List
Caption          : AMD64 Family 25 Model 1 Stepping 1
DeviceID          : CPU0
Manufacturer      : AuthenticAMD
MaxClockSpeed    : 3200
Name              : AMD EPYC 74F3 24-Core Processor
SocketDesignation : CPU 0
Caption          : AMD64 Family 25 Model 1 Stepping 1
DeviceID          : CPU1
Manufacturer      : AuthenticAMD
MaxClockSpeed    : 3200
Name              : AMD EPYC 74F3 24-Core Processor
SocketDesignation : CPU 1
</pre>


== Other ==
== Other ==

Latest revision as of 06:09, 14 April 2026

Deprecated in Favor of CIM

"Windows PowerShell ships by default with cmdlets for working with other technologies such as Windows Management Instrumentation (WMI). The WMI cmdlets are deprecated and are not available in PowerShell 6+, but are covered here as you may encounter them in older scripts running on Windows PowerShell. For new development, use the CIM cmdlets instead."

WARNING: WMIC is deprecated, in favor of PowerShell WMI which was deprecated in favor of PowerShell CIM ! (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 PowerShell/WMI

See PowerShell/CIM

ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic

Motherboard

Get-WmiObject Win32_BaseBoard
Get-WmiObject Win32_BaseBoard | Format-Table -AutoSize Manufacturer,Product,SerialNumber,Version

processor

PS C:\> Get-WmiObject win32_processor | Format-List


Caption           : AMD64 Family 25 Model 1 Stepping 1
DeviceID          : CPU0
Manufacturer      : AuthenticAMD
MaxClockSpeed     : 3200
Name              : AMD EPYC 74F3 24-Core Processor
SocketDesignation : CPU 0

Caption           : AMD64 Family 25 Model 1 Stepping 1
DeviceID          : CPU1
Manufacturer      : AuthenticAMD
MaxClockSpeed     : 3200
Name              : AMD EPYC 74F3 24-Core Processor
SocketDesignation : CPU 1

Other

Get-WmiObject -List
Get-help Get-WmiObject
Get-help Get-WmiObject -examples

get-wmiobject help

Get-WmiObject (Microsoft.PowerShell.Management) - PowerShell | Microsoft Learn
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1

Video Card

C:\>wmic path win32_VideoController get name
Name
NVIDIA GeForce RTX 4060 Ti

If your video card has less than 4GB of ram (32bit limitation) this will also work to show amount of video ram:

C:\>wmic path win32_VideoController get adapterram

Powershell version of wmic:

get-ciminstance win32_videocontroller | select-object -expandproperty adapterram

WMIC

See Windows/wmic

keywords