CMD 7 wmic 命令詳解


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. 用法信息。

 

role alias

參數 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 服務操作參數管理。

 

command

參數 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) /? 展示更多命令相關幫助信息

 

版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。