windows wmic_Windows WMIC(Windows管理界面命令)教程和示例

windows wmic

windows wmic

WMIC or Windows Management Interface Command is a simple command line tool used to issue WMI commands. WMI command generally used to query all of the system related information like Computer Name, BIOS Serial Number, Mac Address etc.

WMIC或Windows管理界面命令是用于发布WMI命令的简单命令行工具。 WMI命令通常用于查询所有与系统相关的信息,例如计算机名称,BIOS序列号,Mac地址等。

批量WMIC (Batch WMIC)

WMIC provides two type of usage. Batch usage is the most popular where we can issue WMI commands into MS-DOS or PowerShell like below.

WMIC提供两种用法。 批处理用法是最流行的,我们可以将WMI命令发布到MS-DOS或PowerShell中,如下所示。

> wmic /?
Batch WMIC
Batch WMIC
批量WMIC

交互式WMIC命令行 (Interactive WMIC Command Line)

WMIC also provides an interactive shell where we can issue wmic options as commands. We can enter VMIC interactive shell just running wmic command like below.

WMIC还提供了一个交互式外壳,我们可以在其中发布wmic选项作为命令。 我们可以像下面这样运行wmic命令来进入VMIC交互式shell。

PS> wmic
Interactive WMIC Command Line
Interactive WMIC Command Line
交互式WMIC命令行

查找计算机制造商和型号(Find Computer Manufacturer and Model)

We can use Computer option in order to print the current system manufacturer and model.

我们可以使用Computer选项来打印当前的系统制造商和型号。

> wmic ComputerSystem GET Model
Find Computer Manufacturer and Model
Find Computer Manufacturer and Model
查找计算机制造商和型号

打印计算机名称(Print Computer Name)

Computer name can be printed with the computersystem and name options like below.

可以使用以下computersystemname选项来打印computersystem name

> wmic computersystem get name
Print Computer Name
Print Computer Name
打印计算机名称

打印BIOS序列号(Print BIOS Serial Number)

Every computer system have a serial number. This serial number is unique to the system. We can print current system serial number with the bios and serialnumber options like below.

每个计算机系统都有一个序列号。 该序列号是系统唯一的。 我们可以使用下面的biosserialnumber选项打印当前系统的序列号。

> wmic bios get serialnumber
Print Serial Number
Print Serial Number
打印序列号

打印网络接口Mac地址(Print Network Interface Mac Addresses)

wmic command also provides operations about the Network Interface. We can use nic option with different extra options like macaddress ,description.

wmic命令还提供有关网络接口的操作。 我们可以将nic选项与其他不同的选项一起使用,例如macaddressdescription

> wmic nic get macaddress
Print Network Interface Mac Addresses
Print Network Interface Mac Addresses
打印网络接口Mac地址

打印主板型号和编号(Print Motherboards Model and Number)

Mothterboards have some model and model number information. We can print motherboard model with the following command.

滑行板具有一些型号和型号信息。 我们可以使用以下命令打印主板型号。

> wmic baseboard get product
Print Motherboards Model and Number
Print Motherboards Model and Number
打印主板型号和编号

打印RAM或物理内存大小(Print RAM or Physical Memory Size)

We can use wmic command in order to get RAM or Physical Memory Size information with the following command.

我们可以使用wmic命令来通过以下命令获取RAM或物理内存大小信息。

> wmic COMPUTERSYSTEM get TotalPhysicalMemory
Print RAM or Physical Memory Size
Print RAM or Physical Memory Size
打印RAM或物理内存大小

打印所有正在运行的应用程序,程序及其RAM /内存使用情况(Print All Running Application, Programmes, and Their RAM/Memory Usage)

We can print currently running applications, programmes and their RAM or Memory usage with the process option like below.

我们可以使用如下所示的process选项来打印当前正在运行的应用程序,程序及其RAM或内存使用情况。

> wmic process get workingsetsize,commandline
Print All Running Application, Programmes, and Their RAM/Memory Usage
Print All Running Application, Programmes, and Their RAM/Memory Usage
打印所有正在运行的应用程序,程序及其RAM /内存使用情况

打印分区名称,大小和类型(Print Partition Name, Size, and Type)

We can use partition option with the name,size and type options to print partitions information and file system type.

我们可以使用partition选项与namesizetype选择打印分区信息和文件系统类型。

> wmic partition get name,size,type
Print Partition Name, Size, and Type
Print Partition Name, Size, and Type
打印分区名称,大小和类型

清单服务(List Services)

We can list currently installed Services on the system. We will use  service option with the list and brief options like below.

我们可以列出系统上当前安装的服务。 我们将在list使用service选项,并在下面提供brief选项。

> wmic service list brief

列出流程 (List Processes)

Currently running process and brief information about the can be listed lie below.

下面列出了当前正在运行的进程以及有关的简要信息。

> wmic process list brief

List Processes
List Processes
列出流程

杀死给定过程(Kill Given Process)

Even we can use wmic to kill the current running process. We will use process option with the where statement and related terminate command. In this example, we will kill the process named chrome.exe which can be listed with the previous command.

甚至我们都可以使用wmic杀死当前正在运行的进程。 我们将结合使用process选项和where语句以及相关的terminate命令。 在此示例中,我们将chrome.exe名为chrome.exe的进程,该进程可以与前面的命令一起列出。

>wmic process where name="chrome.exe" call terminate
Kill Given Process
Kill Given Process
杀死给定过程

列出启动应用程序(List Startup Applications)

After the Windows operating system is started some applications are started automatically. These applications are different from services. They are generally called Startup Applications. We can list these Startup Applications with the wmic like below.

Windows操作系统启动后,一些应用程序将自动启动。 这些应用程序与服务不同。 它们通常被称为Startup Applications 。 我们可以使用以下wmic列出这些启动应用程序。

> wmic startup list brief
List Startup Applications
List Startup Applications
列出启动应用程序

将WMIC输出写入文件(Write WMIC Output Into A File)

We can redirect any wmic command output into a file. We will use the redirect operator > . In this example, we will write the  process list into a file named processes.txt . Keep in mind that we should have write access to the current working directory.

我们可以将任何wmic命令输出重定向到文件中。 我们将使用重定向运算符> 。 在此示例中,我们将流程列表写入名为processes.txt的文件中。 请记住,我们应该对当前工作目录具有写权限。

>wmic process list brief > process.txt

列出磁盘驱动器(HDD) (List Disk Drives (HDD))

We can use diskdrive option in order to list currently connected disk drives. These drives can be HDD or ISCSI or similar.

我们可以使用diskdrive选项来列出当前连接的磁盘驱动器。 这些驱动器可以是HDD或ISCSI或类似驱动器。

> wmic diskdrive get model,name,size
List Disk Drives (HDD)
List Disk Drives (HDD)
列出磁盘驱动器(HDD)

列出简短的操作系统信息 (List Brief Operating System Information)

We can also print basic operating system information. This will provide following inforation

我们还可以打印基本的操作系统信息。 这将提供以下信息

  • Build Number

    内部编号
  • Organization

    组织
  • Registered USer

    注册用户
  • Serial Number

    序列号
  • System Directory

    系统目录
  • Version

>wmic os list brief
List Brief Operating System Information
List Brief Operating System Information
列出简短的操作系统信息
LEARN MORE  What Is Windows Sysinternal?
了解更多什么是Windows Sysinternal?

翻译自: https://www.poftut.com/windows-wmic-windows-management-interface-command-tutorial-with-examples/

windows wmic

相关推荐

如何使用 WMIC 命令Windows 11 或 10 上卸载软件

WMIC 命令提供了一种可脚本化的方法,用于从 Windows 10/11 操作系统中移除应用程序或软件包。因此,它为系统管理高级用户管理已安装软件提供了一种高效的方式,尤其是那些喜欢使用命令行的人。

山岚的运维笔记 2370

wmic 常用的获取计算机信息的命令

获取主板信息:wmic baseboard get product,manufacturer,version。获取显卡信息:wmic path Win32_VideoController get name。wmic computersystem get model # 获取计算机的型号。wmic bios get serialnumber # 获取主板的序列号。wmic cpu get name # 获取CPU的名字。获取cpu信息:wmic cpu get name。

为了生活,不得不努力奋斗! 1672

使用WMIC进行Windows系统全面命令管理

Windows Management Instrumentation Command-line (WMIC) 是微软推出的一款强大的命令行工具,专门用于访问管理Windows系统的本地远程计算机。它允许系统管理员在命令行环境下执行各种系统管理任务,如查询硬件软件信息、管理进程服务以及操作系统性能监控等。

weixin_29215509的博客 2123

一些wmic例子

[size=medium]BIOS - 基本输入/输出服务 (BIOS) 管理 ::查看bios版本型号 wmic bios get Manufacturer,Name COMPUTERSYSTEM - 计算机系统管理 ::查看系统启动选项,boot的内容 wmic COMPUTERSYSTEM get SystemStartupOptions ::查看工作组/域 wmic ...

origin 专栏 390

windows比cmd更强大的 WMIC命令使用详解

windows比cmd更强大的 WMIC命令使用详解

whl0071的专栏 6833

Windows 命令 WMIC 使用详解

WMIC扩展WMI(Windows Management Instrumentation,Windows管理工具) ,提供了从命令行接口命令脚本执行系统管理的支持。在WMIC出现之前,如果要管理WMI系统,必须使用一些专门的WMI应用,例如SMS,或者使用WMI的脚本编程API,或者使用象CIM Studio之类的工具。如果不熟悉C++之类的编程语言或VBScript之类的脚本语言,或...

树欲静而风不止 1万+

Windows 中的强大工具:WMIC

Windows 操作系统中,WMICWindows Management Instrumentation Command-line)是一个非常实用的命令管理工具,它允许用户通过命令界面访问管理 Windows Management Instrumentation(WMI)提供的系统信息管理功能。在进行远程管理时,需要确保远程计算机上的 WMI 服务已启动,并且你有足够的权限来执行相应的操作。其中, <类名> 指定要操作的 WMI 类, <操作> 指定要执行的操作,如查询、创建、删除等。

m0_57836225的博客 2349

Windows wmic命令之process进程管理

之前使用的是linux,对于进程管理特别方便,相较之下,windows命令管理进程就不是那么如意,随研究了一番wmic,记录如下,基本就是根据帮助文档来试验的。 wmic命令总览 C:\Users\Administrator>wmic /? WMIC 已弃用。 [全局开关] <命令> 可以使用以下全局开关: /NAMESPACE 别名在其上操作...

yetugeng的专栏 1万+

【转】wmic命令

友情链接:wmic命令 目录 一、如何获取帮助文档 (1)wmic /? (2)wmic nic /? (3)wmic nic get ##获取网卡所有信息,如下只列出部分列 (4)信息筛选 二、常用操作使用说明 1、PROCESS —— 进程管理 2、BIOS - 基本输入/输出服务 (BIOS) 管理 3、COMPUTERSYSTEM - 计算机系统管理 4、CPU - CPU 管理 5、DATAFile — DATAFile管理 6、DESKTOPMONITOR - 监视器管理 7、EN

莫非圣贤的博客 1万+

Windows命令--wmic

其他网址 windows比cmd更强大的 WMIC命令使用详解_第七宇林的博客-CSDN博客_wmic命令 什么是wmic ? WMIC是扩展WMI(Windows Management Instrumentation,Windows管理规范),提供了从命令行接口命令脚本执行系统管理的支持。在WMIC出现之前,如果要管理WMI系统,必须使用一些专门的WMI应用,比如SMS,或者使用WMI的脚本编程API,或者使用象CIM Studio之类的工具。如果不熟悉C++之类的编程语言...

IT利刃出鞘的博客 4494

Windows WMIC命令详解

Windows WMIC命令详解 【例】将当前系统BIOS,CPU,主板等信息输出到一个HTML网页文件,命令如下: ::得到系统信息.bat,运行bat文件即可 ::系统信息输出到HTML文件,查看帮助: wmic /? ::wmic [系统参数名] list [brief|full] /format:hform >|>> [文件名] wmic bios...

allway2的博客 2962

WMIC命令行对Windows的全面管理

Windows 2000开始,WMI(Windows 管理规范)就是Windows系统管理的重要组成部分。WMICWindows Management Instrumentation Command-line的简称,在WMIC出现之前,要从命令行访问WMI数据库或WMI名称空间不是一件容易的事情。现在,WMIC利用WMI强大的功能把系统管理扩展到了命令行。   一、什么是WMIC?   WMIC扩展WMI,提供了从命令行接口命令脚本执行系统管理的支持。在WMIC出现之前,如果要管理W..

weixin_39802884的博客 463

Windows 11【1001问】启用Windows 11 wmic命令的2种方法

随着技术的不断进步,微软也在持续优化其操作系统功能,以提供更高效、更安全的用户体验。然而,这种优化有时也意味着一些传统工具的逐步淘汰。例如,在Windows 11版本24H2中,用户可能会遇到wmic命令无法识别的问题。本文将深入探讨这一现象的原因,并提供解决方法,帮助用户重新启用WMIC功能,确保系统管理工作的顺利进行。

WenZhongxiang 7857

WMIC 命令管理方式

上期的专栏里,NP给大家写了一篇很精彩也很有实际应用效果的批处理教程。这期,我给大家讲一下最近我学习wmic的体会。在这篇文章里也许你看不 到很多奇特有用的的实际例程,但是呢,授人以鱼不如授人以渔,希望我的文章能让你通俗易懂的了解一些wmic的基本知识,可以有一个学习的兴趣,让自己继 续深研一下wmic。在WINDOWS/Help目下,wmic.chm文档是这样解释wmi的:Windows Man

thunder09的专栏--没事就写点儿 6110

Windows WMIC命令使用详解

Windows WMIC命令使用详解(附实例) 温馨提示:易贤网小编为您整理了“Windows WMIC命令使用详解(附实例)”,方便广大网友查阅! 第一次执行WMIC命令时,Windows首先要安装WMIC,然后显示出WMIC命令行提示符。在WMIC命令行提示符上,命令以交互的方式执行 执行“wmic命令启动WMIC命令行环境。这个命令可以在XP或 .NET Server的标准命令行解...

梁海江的博客 2012

信息收集--wmic命令

后渗透信息收集之wmic命令的一些使用方法前言一、关于wmic二、wmic的简单使用三、以进程为例展现wmic的使用总结 前言     wmiccmd一样在所有的windows版本中都存在,同时wmic有很多cmd下不方便使用的部分 一、关于wmic     WMI命令(WMIC)实用程序为WMI提供了命令界面WMIC与现有的Shell实用程序命令兼容。在WMIC出现之前,如果要管理WMI系统,必须使用一些专门的WMI应用,例如SMS,或者使用WMI的脚本编程API,或者使用像CIM Stu

qq_44555676的博客 1万+

Windows命令-wmic

wmic命令

cat_eat_fish 3047

Windows-WMIC

WMICWindows系统中一款经典的命令管理工具,核心价值是“简化WMI的调用”,适用于快速查询系统资源、执行基础管理操作;但由于微软已宣布弃用,新的管理场景建议优先使用PowerShell的CIM相关命令。对于需要维护旧系统或习惯命令行的用户,WMIC仍是一个高效的临时工具。

徐子元 1280
上一篇: linux设置静态ip地址_什么是静态IP地址,与动态IP地址比较以及如何为Windows和Linux设置?...
下一篇: 带有示例Linux uuencode命令教程
cunjiu9486
博客等级 码龄10年 224粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值