PowerShell/WMI: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "== Video Controller == get-ciminstance win32_videocontroller | select-object -expandproperty adapterram")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Video Controller ==
== 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|PowerShell WMI]] which was deprecated in favor of [[PowerShell/CIM|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]]
ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic
== Video Card ==
<pre>
C:\>wmic path win32_VideoController get name
Name
NVIDIA GeForce RTX 4060 Ti
</pre>
If your video card has less than 4GB of ram (32bit limitation) this will also work to show amount of video ram:
<pre>
C:\>wmic path win32_VideoController get adapterram
</pre>
Powershell version of wmic:
  get-ciminstance win32_videocontroller | select-object -expandproperty adapterram
  get-ciminstance win32_videocontroller | select-object -expandproperty adapterram
== keywords ==
== keywords ==

Latest revision as of 05:24, 4 August 2024

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

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

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

keywords

keywords