PowerShell/WMI: Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== 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/CMI|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 [[PowerShell/WMI]] | |||
ref: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic | |||
== Video Card == | == Video Card == | ||
Line 14: | Line 27: | ||
Powershell version of wmic: | Powershell version of wmic: | ||
get-ciminstance win32_videocontroller | select-object -expandproperty adapterram | get-ciminstance win32_videocontroller | select-object -expandproperty adapterram | ||
== keywords == | |||
== keywords == | == keywords == |
Revision as of 05:23, 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 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 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