zoukankan      html  css  js  c++  java
  • 2019-7-29-PowerShell-拿到显卡信息

    title author date CreateTime categories
    PowerShell 拿到显卡信息
    lindexi
    2019-7-29 10:3:35 +0800
    2019-02-21 09:47:52 +0800

    本文告诉大家如何在 PowerShell 通过 WMI 拿到显卡信息

    在 PowerShell 可以使用下面代码拿到显卡的信息

    Get-WmiObject Win32_VideoController

    打开 PowerShell 输入代码可以看到下面内容,当然因为小伙伴的显卡和我不相同,拿到的字符串是不相同

    __GENUS                      : 2
    __CLASS                      : Win32_VideoController
    __SUPERCLASS                 : CIM_PCVideoController
    __DYNASTY                    : CIM_ManagedSystemElement
    __RELPATH                    : Win32_VideoController.DeviceID="VideoController1"
    __PROPERTY_COUNT             : 59
    __DERIVATION                 : {CIM_PCVideoController, CIM_VideoController, CIM_Controller, CIM_LogicalDevice...}
    __SERVER                     : lindexi
    __NAMESPACE                  : rootcimv2
    __PATH                       : \lindexirootcimv2:Win32_VideoController.DeviceID="VideoController1"
    AcceleratorCapabilities      :
    AdapterCompatibility         : Intel Corporation
    AdapterDACType               : Internal
    AdapterRAM                   : 1073741824
    Availability                 : 3
    CapabilityDescriptions       :
    Caption                      : Intel(R) HD Graphics 530
    ColorTableEntries            :
    ConfigManagerErrorCode       : 0
    ConfigManagerUserConfig      : False
    CreationClassName            : Win32_VideoController
    CurrentBitsPerPixel          : 32
    CurrentHorizontalResolution  : 1920
    CurrentNumberOfColors        : 4294967296
    CurrentNumberOfColumns       : 0
    CurrentNumberOfRows          : 0
    CurrentRefreshRate           : 60
    CurrentScanMode              : 4
    CurrentVerticalResolution    : 1080
    Description                  : Intel(R) HD Graphics 530
    DeviceID                     : VideoController1
    DeviceSpecificPens           :
    DitherType                   : 0
    DriverDate                   : 20181119000000.000000-000
    DriverVersion                : 23.20.16.4973
    ErrorCleared                 :
    ErrorDescription             :
    ICMIntent                    :
    ICMMethod                    :
    InfFilename                  : oem16.inf
    InfSection                   : iSKLD_w10_DS
    InstallDate                  :
    InstalledDisplayDrivers      : C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92d70c30b8effeigdumd
                                   im64.dll,C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92d70c30b8ef
                                   feigd10iumd64.dll,C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92
                                   d70c30b8effeigd10iumd64.dll,C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_
                                   amd64_2c92d70c30b8effeigd12umd64.dll
    LastErrorCode                :
    MaxMemorySupported           :
    MaxNumberControlled          :
    MaxRefreshRate               : 75
    MinRefreshRate               : 59
    Monochrome                   : False
    Name                         : Intel(R) HD Graphics 530
    NumberOfColorPlanes          :
    NumberOfVideoPages           :
    PNPDeviceID                  : PCIVEN_8086&DEV_1912&SUBSYS_D0001458&REV_063&11583659&0&10
    PowerManagementCapabilities  :
    PowerManagementSupported     :
    ProtocolSupported            :
    ReservedSystemPaletteEntries :
    SpecificationVersion         :
    Status                       : OK
    StatusInfo                   :
    SystemCreationClassName      : Win32_ComputerSystem
    SystemName                   : lindexi
    SystemPaletteEntries         :
    TimeOfLastReset              :
    VideoArchitecture            : 5
    VideoMemoryType              : 2
    VideoMode                    :
    VideoModeDescription         : 1920 x 1080 x 4294967296 种颜色
    VideoProcessor               : Intel(R) HD Graphics Family
    PSComputerName               : lindexi

    如果只需要一些必要的数据,通过 Format-List 拿到特殊的属性

    Get-WmiObject Win32_VideoController | Format-List AcceleratorCapabilities,AdapterCompatibility,AdapterDACType,AdapterRAM,Availability,CapabilityDescriptions,Caption,DeviceID,DriverDate,DriverVersion,InstallDate,InstalledDisplayDrivers

    运行上面代码会显示比上面少的信息

    AcceleratorCapabilities :
    AdapterCompatibility    : Intel Corporation
    AdapterDACType          : Internal
    AdapterRAM              : 1073741824
    Availability            : 3
    CapabilityDescriptions  :
    Caption                 : Intel(R) HD Graphics 530
    DeviceID                : VideoController1
    DriverDate              : 20181119000000.000000-000
    DriverVersion           : 23.20.16.4973
    InstallDate             :
    InstalledDisplayDrivers : C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92d70c30b8effeigdumdim64.
                              dll,C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92d70c30b8effeigd10iu
                              md64.dll,C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92d70c30b8effeig
                              d10iumd64.dll,C:WINDOWSSystem32DriverStoreFileRepositoryigdlh64.inf_amd64_2c92d70c30b8ef
                              feigd12umd64.dll

    博客园博客只做备份,博客发布就不再更新,如果想看最新博客,请到 https://blog.lindexi.com/

    知识共享许可协议
    本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。欢迎转载、使用、重新发布,但务必保留文章署名[林德熙](http://blog.csdn.net/lindexi_gd)(包含链接:http://blog.csdn.net/lindexi_gd ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我[联系](mailto:lindexi_gd@163.com)。
  • 相关阅读:
    poj 3617 Best Cow Line
    POJ 1852 Ants
    Pairs
    codility MinAbsSum
    Codeforces Beta Round #67 (Div. 2)C. Modified GCD
    timus 1018. Binary Apple Tree
    C
    HDU 1299Diophantus of Alexandria
    BZOJ2155(?) R集合 (卡特兰数)
    CSP模拟赛 number (二分+数位DP)
  • 原文地址:https://www.cnblogs.com/lindexi/p/12086466.html
Copyright © 2011-2022 走看看