• PowerShell 通过 WMI 获取系统信息


    本文告诉大家如何通过 WMI 使用 Win32_OperatingSystem 获取设备厂商

    通过下面代码可以获取 系统版本和系统是专业版还是教育版

    Get-WmiObject Win32_OperatingSystem | Format-List BootDevice,BuildNumber,BuildType,Caption,CodeSet,CountryCode,CreationClassName,CSCreationClassName,CSDVersion,CSName,Description,Locale,Manufacturer,Name,Organization,OSArchitecture,OtherTypeDescription,PlusProductID,PlusVersionNumber,RegisteredUser,SerialNumber,Status,SystemDevice,SystemDirectory,SystemDrive,Version,WindowsDirectory
    

    运行代码

    BootDevice           : DeviceHarddiskVolume2
    BuildNumber          : 17763
    BuildType            : Multiprocessor Free
    Caption              : Microsoft Windows 10 专业版
    CodeSet              : 936
    CountryCode          : 86
    CreationClassName    : Win32_OperatingSystem
    CSCreationClassName  : Win32_ComputerSystem
    CSDVersion           :
    CSName               : DESKTOP-KA1CD6M
    Description          :
    Locale               : 0804
    Manufacturer         : Microsoft Corporation
    Name                 : Microsoft Windows 10 专业版|C:WINDOWS|DeviceHarddisk0Partition4
    Organization         :
    OSArchitecture       : 64 位
    OtherTypeDescription :
    PlusProductID        :
    PlusVersionNumber    :
    RegisteredUser       : lindexi_gd@outlook.com
    SerialNumber         : 00331-10000-00001-AA523
    Status               : OK
    SystemDevice         : DeviceHarddiskVolume4
    SystemDirectory      : C:WINDOWSsystem32
    SystemDrive          : C:
    Version              : 10.0.17763
    WindowsDirectory     : C:WINDOWS
    

    Win32_OperatingSystem class - Windows applications

    我搭建了自己的博客 https://blog.lindexi.com/ 欢迎大家访问,里面有很多新的博客。只有在我看到博客写成熟之后才会放在csdn或博客园,但是一旦发布了就不再更新

    如果在博客看到有任何不懂的,欢迎交流,我搭建了 dotnet 职业技术学院 欢迎大家加入

    知识共享许可协议
    本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。欢迎转载、使用、重新发布,但务必保留文章署名林德熙(包含链接:http://blog.csdn.net/lindexi_gd ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我联系

  • 相关阅读:
    绑定class -vue
    二叉树按层打印,并且按层换行的方法
    curl相关知识
    python创建简单的http服务器
    有关rides数据库的想法
    java模拟实现有序表操作
    php静态方法
    php关闭浏览器不终止运行
    php读取图片以二进制输出
    借用face++人脸识别,来识别年龄
  • 原文地址:https://www.cnblogs.com/lindexi/p/12086854.html
Copyright © 2020-2023  润新知