wmic 是 WMI 的中间层命令行 批处理扩展, 可按交互 (或非交互) 方式运行。
WMI 是 Windows Management Instrumentation (Windows 管理仪表) 的简写。
wmic 可远程连接到任何一台装有 WMI 的计算机 (但远程计算机可不安装 wmic)。
譬如: 从运行 Win7 的计算机启动 wmic, 可连接和管理所有装有 Win7 XP 2K NT4.0 Me 和 9x 的计算机。
另请参阅: WinRM
wmic cpu
基本语法
wmic [global switches] <command>
global switches
| 参数 | EN 解释 | 中文翻译 | 备注 | 
|---|---|---|---|
| /NAMESPACE | Path for the namespace the alias operate against. | 别名操作所针对的名称空间路径。 | |
| /ROLE | Path for the role containing the alias definitions. | 包含别名定义的角色路径。 | |
| /NODE | Servers the alias will operate against. | 别名操作将针对的服务器。 | |
| /IMPLEVEL | Client impersonation level. | 客户端的模仿级别。 | |
| /AUTHLEVEL | Client authentication level. | 客户端身份验证级别。 | |
| /LOCALE | Language id the client should use. | 客户端应使用的语言 ID。 | |
| /PRIVILEGES | Enable or disable all privileges. | 启用 (或禁用) 所有特权。 | |
| /TRACE | Outputs debugging information to stderr. | 把调试信息输出到 stderr。 | |
| /RECORD | Logs all input commands and output. | 日志所有输入命令和输出。 | |
| /INTERACTIVE | Sets or resets the interactive mode. | 设置 (或重置) 交互模式。 | |
| /FAILFAST | Sets or resets the FailFast mode. | 设置或重置 FailFast 模式。 | |
| /USER | User to be used during the session. | 会话期间要使用的用户。 | |
| /PASSWORD | Password to be used for session login. | 用于会话登录的口令。 | |
| /OUTPUT | Specifies the mode for output redirection. | 指定输出重定向的方式。 | |
| /APPEND | Specifies the mode for output redirection. | 指定输出重定向的方式。 | |
| /AGGREGATE | Sets or resets aggregate mode. | 设置或重置 aggregate (聚合) 模式。 | |
| /AUTHORITY | Specifies the <authority type> for the connection. | 指定连接的 <权限类型>。 | |
| /?[:<BRIEF|FULL>] | Usage information. | 用法信息。 | 
| 参数 | EN 解释 | 中文翻译 | 备注 | 
|---|---|---|---|
| ALIAS | Access to the aliases available on the local system | 访问本地系统中的可用别名 | |
| BASEBOARD | Base board (also known as a motherboard or system board) management. | 基板 (也称为主板或系统板) 管理。 | |
| BIOS | Basic input/output services (BIOS) management. | BIOS (基本输入/输出服务) 管理。 | |
| BOOTCONFIG | Boot configuration management. | 引导配置管理。 | |
| CDROM | CD-ROM management. | CD-ROM 管理。 | |
| COMPUTERSYSTEM | Computer system management. | 计算机系统管理。 | |
| CPU | CPU management. | CPU 管理。 | |
| CSPRODUCT | Computer system product information from SMBIOS. | 来自 SMBIOS 的计算机系统产品信息。 | |
| DATAFILE | DataFile Management. | DataFile 管理。 | |
| DCOMAPP | DCOM Application management. | DCOM 应用程序管理。 | |
| DESKTOP | User's Desktop management. | 用户的桌面管理。 | |
| DESKTOPMONITOR | Desktop Monitor management. | 桌面监视器管理。 | |
| DEVICEMEMORYADDRESS | Device memory addresses management. | 设备内存地址管理。 | |
| DISKDRIVE | Physical disk drive management. | 物理磁盘驱动器管理。 | |
| DISKQUOTA | Disk space usage for NTFS volumes. | NTFS 卷的磁盘空间使用情况。 | |
| DMACHANNEL | Direct memory access (DMA) channel management. | DMA (直接内存访问) 通道管理。 | |
| ENVIRONMENT | System environment settings management. | 系统环境设置管理。 | |
| FSDIR | Filesystem directory entry management. | 文件系统目录条目管理。 | |
| GROUP | Group account management. | 组帐户管理。 | |
| IDECONTROLLER | IDE Controller management. | IDE 控制器管理。 | |
| IRQ | Interrupt request line (IRQ) management. | IRQ (中断请求线) 管理。 | |
| JOB | Provides access to the jobs scheduled using the schedule service. | 提供对使用计划服务的计划作业的访问。 | |
| LOADORDER | Management of system services that define execution dependencies. | 管理定义执行依赖的系统服务。 | |
| LOGICALDISK | Local storage device management. | 本地存储设备管理。 | |
| LOGON | LOGON Sessions. | 登录会话。 | |
| MEMCACHE | Cache memory management. | 缓存内存管理。 | |
| MEMORYCHIP | Memory chip information. | 内存芯片信息。 | |
| MEMPHYSICAL | Computer system's physical memory management. | 计算机系统的物理内存管理。 | |
| NETCLIENT | Network Client management. | 网络客户端管理。 | |
| NETLOGIN | Network login information (of a particular user) management. | (特定用户的) 网络登录信息管理。 | |
| NETPROTOCOL | Protocols (and their network characteristics) management. | 协议 (及其网络规格参数) 管理。 | |
| NETUSE | Active network connection management. | 活动的网络连接管理。 | |
| NIC | Network Interface Controller (NIC) management. | NIC (网络接口控制器) 管理。 | |
| NICCONFIG | Network adapter management. | 网络适配器管理。 | |
| NTDOMAIN | NT Domain management. | NT 域管理。 | |
| NTEVENT | Entries in the NT Event Log. | NT 事件日志中的条目。 | |
| NTEVENTLOG | NT eventlog file management. | NT eventlog 文件管理。 | |
| ONBOARDDEVICE | Management of common adapter devices built into the motherboard (system board). | 管理主板 (系统板) 内置的通用适配器设备。 | |
| OS | Installed Operating System/s management. | 已安装的操作系统管理。 | |
| PAGEFILE | Virtual memory file swapping management. | 虚拟内存文件交换管理。 | |
| PAGEFILESET | Page file settings management. | 页面文件设置管理。 | |
| PARTITION | Management of partitioned areas of a physical disk. | 物理磁盘的分区区域的管理。 | |
| PORT | I/O port management. | I/O 端口管理。 | |
| PORTCONNECTOR | Physical connection ports management. | 物理连接端口管理。 | |
| PRINTER | Printer device management. | 打印机设备管理。 | |
| PRINTERCONFIG | Printer device configuration management. | 打印机设备配置管理。 | |
| PRINTJOB | Print job management. | 打印作业管理。 | |
| PROCESS | Process management. | 进程管理。 | |
| PRODUCT | Installation package task management. | 安装包任务管理。 | |
| QFE | Quick Fix Engineering. | 快速修复工程。 | |
| QUOTASETTING | Setting information for disk quotas on a volume. | 设置卷上磁盘配额的信息。 | |
| RDACCOUNT | Remote Desktop connection permission management. | 远程桌面连接权限管理。 | |
| RDNIC | Remote Desktop connection management on a specific network adapter. | 特定网络适配器上的远程桌面连接管理。 | |
| RDPERMISSIONS | Permissions to a specific Remote Desktop connection. | 特定远程桌面连接的权限。 | |
| RDTOGGLE | Turning Remote Desktop listener on or off remotely. | 远程打开 (或关闭) 远程桌面监听器。 | |
| RECOVEROS | Information that will be gathered from memory when the operating system fails. | 当操作系统发生故障时,从内存中聚集的信息。 | |
| REGISTRY | Computer system registry management. | 计算机系统注册表管理。 | |
| SCSICONTROLLER | SCSI Controller management. | SCSI 控制器管理。 | |
| SERVER | Server information management. | 服务器信息管理。 | |
| SERVICE | Service application management. | 服务应用程序管理。 | |
| SHADOWCOPY | Shadow copy management. | 卷影副本管理。 | |
| SHADOWSTORAGE | Shadow copy storage area management. | 卷影副本存储区域管理。 | |
| SHARE | Shared resource management. | 共享资源管理。 | |
| SOFTWAREELEMENT | Management of the elements of a software product installed on a system. | 管理系统中已安装软件产品的元素。 | |
| SOFTWAREFEATURE | Management of software product subsets of SoftwareElement. | 管理 SoftwareElement 的软件产品子集。 | |
| SOUNDDEV | Sound Device management. | 声音设备管理。 | |
| STARTUP | Management of commands that run automatically when users log onto the computer system. | 管理用户登录计算机系统时,自动运行的命令。 | |
| SYSACCOUNT | System account management. | 系统帐户管理。 | |
| SYSDRIVER | Management of the system driver for a base service. | 管理基本服务的系统驱动程序。 | |
| SYSTEMENCLOSURE | Physical system enclosure management. | 物理系统机箱管理。 | |
| SYSTEMSLOT | Management of physical connection points including ports, slots and peripherals, and proprietary connections points. | 管理物理连接点,包括:端口、插槽、外围设备及专有连接点。 | |
| TAPEDRIVE | Tape drive management. | 磁带驱动器管理。 | |
| TEMPERATURE | Data management of a temperature sensor (electronic thermometer). | 温度传感器 (电子温度计) 的数据管理。 | |
| TIMEZONE | Time zone data management. | 时区数据管理。 | |
| UPS | Uninterruptible power supply (UPS) management. | UPS (不间断电源供应) 管理。 | |
| USERACCOUNT | User account management. | 用户帐户管理。 | |
| VOLTAGE | Voltage sensor (electronic voltmeter) data management. | 电压传感器 (电子电压表) 数据管理。 | |
| VOLUME | Local storage volume management. | 本地存储卷管理。 | |
| VOLUMEQUOTASETTING | Associates the disk quota setting with a specific disk volume. | 把磁盘配额设置与特定磁盘卷关联。 | |
| VOLUMEUSERQUOTA | Per user storage volume quota management. | 每用户存储卷配额管理。 | |
| WMISET | WMI service operational parameters management. | WMI 服务操作参数管理。 | 
| 参数 | EN 解释 | 中文翻译 | 备注 | 
|---|---|---|---|
| CLASS | Escapes to full WMI schema. | 转义到完整 WMI 模式。 | |
| PATH | Escapes to full WMI object paths. | 转义到完整 WMI 对象路径。 | |
| CONTEXT | Displays the state of all the global switches. | 显示所有全局开关的状态。 | |
| QUIT/EXIT | Exits the program. | 退出程序。 | 
| 功能 | 命令 | 文字解释 | 示例 | 示例解释 | 
|---|---|---|---|---|
| 主板 | wmic baseboard | 获取主板信息 | ||
| CPU | wmic cpu get maxclockspeed | 获取 CPU 最大时钟速度信息 | ||
| wmic cpu get ProcessorId /format:csv | 以 CSV 格式输出 CPU ID 信息 | |||
| 磁盘 | wmic diskDrive | 展示固定磁盘相关信息 | ||
| wmic logicalDisk | 展示本地固定 (包括移动硬盘) 可移动 网络连接磁盘相关分区信息 | |||
| wmic logicalDisk get DeviceID, Description | 展示本地固定 (包括移动硬盘) 可移动 网络连接磁盘相关盘符 | |||
| 管理 | wmic /interactive:on | 要求执行删除操作时先提示确认 | ||
| wmic /node:MACHINE1 printer list status | 展示 /node:MACHINE1 打印机状态信息 | |||
| wmic process where name="outlook.exe" call terminate | 终止 Outlook 应用程序 | |||
| wmic process where name="TabTip.exe" delete | 删除 TabTip.exe 进程 | |||
| 帮助 | wmic /? | 展示帮助信息 | ||
| wmic alias /? | 展示别名更多帮助信息 | |||
| wmic switch-name /? | 展示开关名更多帮助信息 | |||
| wmic (CLASS | PATH | CONTEXT) /? | 展示更多命令相关帮助信息 | 
版权声明: 本文为独家原创稿件,版权归 乐数软件 ,未经许可不得转载。