WMIC Commands

Windows Management Instrumentation Command-line

Complete Reference Guide

WMIC क्या है?

WMIC (Windows Management Instrumentation Command-line) एक powerful command-line tool है जो Windows में system information प्राप्त करने और management tasks perform करने के लिए उपयोग होता है। यह WMI (Windows Management Instrumentation) का command-line interface है।

⚠️ महत्वपूर्ण नोट: WMIC को Windows 10 और Windows Server 2016 के बाद के versions में deprecated कर दिया गया है। Microsoft अब PowerShell cmdlets का उपयोग करने की सलाह देता है। हालांकि, यह अभी भी कई systems पर काम करता है।

मुख्य विशेषताएं:

  • Hardware और software की detailed information
  • System configuration और management
  • Remote computer management
  • Process और service management
  • Scripting और automation support

Basic Syntax

wmic [alias] [verb] [options]

Common Verbs:

  • GET – Information प्राप्त करें
  • LIST – सभी instances की list
  • CALL – Method execute करें
  • DELETE – Instance को delete करें
  • CREATE – नया instance बनाएं

1. System Information Commands

Computer System Information

wmic computersystem list brief

Computer का basic information (name, manufacturer, model)

wmic computersystem get name,manufacturer,model,totalphysicalmemory

Specific details के साथ

wmic computersystem get domain

Domain/Workgroup name

BIOS Information

wmic bios list brief

BIOS की basic information

wmic bios get serialnumber

BIOS serial number

wmic bios get manufacturer,version,releasedate

BIOS manufacturer और version

Operating System Information

wmic os list brief

OS की basic details

wmic os get caption,version,buildnumber

OS name, version और build number

wmic os get installdate,lastbootuptime

Installation और last boot time

wmic os get freephysicalmemory,totalvisiblememorysize

Memory usage information

wmic os get osarchitecture

32-bit या 64-bit architecture

2. Hardware Information Commands

CPU/Processor Information

wmic cpu list brief

Processor की basic details

wmic cpu get name,numberofcores,maxclockspeed

CPU name, cores और clock speed

wmic cpu get loadpercentage

Current CPU usage percentage

Memory (RAM) Information

wmic memorychip list brief

Physical memory modules की list

wmic memorychip get capacity,speed,manufacturer

RAM capacity, speed और manufacturer

wmic memphysical get maxcapacity

Maximum RAM capacity supported

Disk/Hard Drive Information

wmic diskdrive list brief

सभी disk drives की list

wmic diskdrive get model,size,serialnumber

Disk model, size और serial number

wmic logicaldisk list brief

Logical drives (C:, D:, etc.)

wmic logicaldisk get name,size,freespace,filesystem

Drive name, total size, free space और file system

wmic partition list brief

Disk partitions की list

Motherboard Information

wmic baseboard list brief

Motherboard की basic information

wmic baseboard get manufacturer,product,serialnumber

Motherboard manufacturer, model और serial

3. Network Information Commands

Network Adapter Information

wmic nic list brief

सभी network adapters

wmic nic get name,macaddress,speed

Adapter name, MAC address और speed

wmic nicconfig list brief

Network configuration details

wmic nicconfig get ipaddress,macaddress,dhcpserver

IP address, MAC address और DHCP server

wmic nicconfig where IPEnabled=true get description,ipaddress

केवल enabled adapters की IP information

4. Process Management Commands

Process Information

wmic process list brief

सभी running processes

wmic process get name,processid,parentprocessid

Process name, ID और parent process ID

wmic process where name=”notepad.exe” get processid,executablepath

Specific process की details

wmic process get workingsetsize,name

Memory usage by processes

Process Control

wmic process where name=”notepad.exe” delete

Process को terminate करें

wmic process where processid=1234 delete

Process ID से terminate करें

wmic process call create “notepad.exe”

नया process start करें

5. Service Management Commands

wmic service list brief

सभी services की list

wmic service get name,state,startmode

Service name, state और start mode

wmic service where state=”running” get name,displayname

केवल running services

wmic service where name=”Spooler” get state

Specific service की state check करें

wmic service where name=”Spooler” call startservice

Service को start करें

wmic service where name=”Spooler” call stopservice

Service को stop करें

6. Software Information Commands

Installed Software

wmic product list brief

सभी installed programs

wmic product get name,version,vendor

Program name, version और vendor

wmic product where name=”Adobe Reader” get version

Specific software का version check करें

wmic product where name=”unwanted program” call uninstall

⚠️ सावधानी: Program को uninstall करें (सावधानी से use करें)

Startup Programs

wmic startup list brief

Startup पर चलने वाले programs

wmic startup get caption,command,location

Startup program details

7. User Account Management Commands

wmic useraccount list brief

सभी user accounts

wmic useraccount get name,fullname,sid

User name, full name और SID

wmic useraccount where name=’username’ get status

User account status

wmic group list brief

सभी user groups

8. Battery और Power Commands (Laptops)

wmic battery list brief

Battery information

wmic battery get estimatedchargeremaining,batterystatus

Battery charge और status

wmic path win32_battery get estimatedruntime

Estimated remaining runtime

9. Advanced WMIC Commands

Event Log

wmic nteventlog list brief

Event logs की list

wmic nteventlog get logfilename,numberofrecords

Log file names और record count

Desktop Settings

wmic desktop list brief

Desktop configuration

wmic desktop get screensaveractive,wallpaper

Screensaver और wallpaper settings

Printer Information

wmic printer list brief

Installed printers

wmic printer get name,portname,drivername

Printer details

Temperature Monitoring (if supported)

wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature

System temperature (अगर supported हो)

10. Output Formatting Options

wmic cpu list /format:list

List format में output

wmic cpu list /format:csv

CSV format में output

wmic cpu list /format:table

Table format में output

wmic cpu list brief > cpu_info.txt

Output को file में save करें

11. Remote Computer Management

wmic /node:computername process list brief

Remote computer की processes

wmic /node:192.168.1.100 /user:admin /password:pass computersystem get name

Credentials के साथ remote access

wmic /node:@computers.txt process list brief

Multiple computers (file से list)

12. Complete WMIC Aliases List

WMIC में कई pre-defined aliases हैं जो commonly used WMI classes के लिए shortcuts हैं:

AliasDescription
BIOSBIOS chip information
BASEBOARDMotherboard information
BOOTCONFIGBoot configuration
CDROMCD-ROM drives
COMPUTERSYSTEMComputer system information
CPUProcessor information
CSPRODUCTComputer system product
DATAFILEDataFile management
DCOMAPPDCOM applications
DESKTOPDesktop settings
DESKTOPMONITORDesktop monitor
DISKDRIVEPhysical disk drives
DISKQUOTADisk space usage
ENVIRONMENTEnvironment variables
FSDIRFile system directory
GROUPUser groups
IDECONTROLLERIDE controller
IRQInterrupt requests
JOBScheduled jobs
LOADORDERSystem load order
LOGICALDISKLogical disks (C:, D:)
LOGONLogon sessions
MEMCACHECache memory
MEMLOGICALLogical memory
MEMPHYSICALPhysical memory
NETCLIENTNetwork client
NETLOGINNetwork login information
NETPROTOCOLNetwork protocols
NETUSENetwork connections
NICNetwork adapters
NICCONFIGNetwork adapter config
NTDOMAINNT domain information
NTEVENTNT Event log
NTEVENTLOGNT Event log files
ONBOARDDEVICEOnboard devices
OSOperating system
PAGEFILEPage file information
PAGEFILESETPage file settings
PARTITIONDisk partitions
PORTI/O ports
PORTCONNECTORPhysical connectors
PRINTERInstalled printers
PRINTERCONFIGPrinter configuration
PRINTJOBPrint jobs
PROCESSRunning processes
PRODUCTInstalled software
QFEQuick Fix Engineering
QUOTASETTINGQuota settings
RECOVEROSOS recovery settings
REGISTRYRegistry information
SCSICONTROLLERSCSI controller
SERVERServer information
SERVICESystem services
SHAREShared resources
SOUNDDEVSound devices
STARTUPStartup programs
SYSACCOUNTSystem accounts
SYSDRIVERSystem drivers
SYSTEMENCLOSUREPhysical system
SYSTEMSLOTPhysical slots
TAPEDRIVETape drives
TEMPERATURETemperature sensors
TIMEZONETime zone information
UPSUPS information
USERACCOUNTUser accounts
VOLTAGEVoltage sensors
WMISETWMI settings

13. Practical Examples और Use Cases

Example 1: Complete System Report

@echo off echo Creating System Report… echo. echo Computer Information: > system_report.txt wmic computersystem get name,manufacturer,model >> system_report.txt echo. >> system_report.txt echo OS Information: >> system_report.txt wmic os get caption,version,buildnumber >> system_report.txt echo. >> system_report.txt echo CPU Information: >> system_report.txt wmic cpu get name,numberofcores,maxclockspeed >> system_report.txt echo. >> system_report.txt echo Memory Information: >> system_report.txt wmic memorychip get capacity,speed >> system_report.txt echo Report created successfully!

Example 2: Monitor Disk Space

wmic logicaldisk where “drivetype=3” get name,size,freespace /format:csv > disk_space.csv

सभी hard drives का space CSV format में

Example 3: Find High CPU Usage Processes

wmic process where “workingsetsize>100000000” get name,workingsetsize

100MB से ज्यादा memory use करने वाले processes

Example 4: Network Adapter Status Check

wmic nicconfig where IPEnabled=true get description,ipaddress,macaddress /format:table

Active network adapters की complete information

14. Tips और Best Practices

उपयोगी टिप्स:

  • List देखने के लिए: wmic /? – सभी available aliases
  • Alias help: wmic cpu /? – किसी specific alias की help
  • Output को file में redirect करने के लिए > या >> operator use करें
  • CSV format automation और data analysis के लिए बेहतर है
  • WHERE clause से specific results filter करें

सावधानियां:

  • WMIC Windows 10 21H1 और बाद में deprecated है
  • Administrator privileges कई commands के लिए जरूरी हैं
  • DELETE और CALL operations सावधानी से use करें
  • Remote commands के लिए proper network permissions चाहिए
  • कुछ commands system performance को affect कर सकते हैं

PowerShell Alternative:

चूंकि WMIC deprecated है, Microsoft PowerShell cmdlets का उपयोग करने की सलाह देता है:

  • Get-WmiObject – WMI information के लिए
  • Get-CimInstance – Modern alternative (recommended)

Quick Reference – Most Used Commands

रोज़मर्रा के काम में सबसे ज्यादा उपयोग होने वाले WMIC commands:

CategoryCommandPurpose
System Infowmic computersystem list briefComputer details
OS Infowmic os get caption,versionWindows version
CPUwmic cpu get name,numberofcoresProcessor info
Memorywmic memorychip get capacityRAM details
Diskwmic diskdrive list briefHard disk info
Logical Driveswmic logicaldisk get name,size,freespaceDrive space
BIOSwmic bios get serialnumberBIOS serial
Networkwmic nic get name,macaddressNetwork adapters
IP Configwmic nicconfig get ipaddressIP addresses
Processeswmic process list briefRunning processes
Serviceswmic service list briefAll services
Softwarewmic product get name,versionInstalled programs
Startupwmic startup list briefStartup programs
Userswmic useraccount get nameUser accounts
Batterywmic battery get estimatedchargeremainingBattery status

निष्कर्ष

WMIC एक powerful command-line tool है जो Windows system administration के लिए बेहद उपयोगी है। हालांकि यह tool अब deprecated हो गया है, फिर भी कई legacy systems और scripts में इसका उपयोग होता है।

भविष्य के लिए: नए projects और scripts में PowerShell cmdlets जैसे Get-CimInstance और Get-WmiObject का उपयोग करना बेहतर है क्योंकि Microsoft इन्हें actively support करता है।

याद रखें: हमेशा commands को समझकर और सावधानी से use करें, खासकर production environments में। DELETE और administrative commands के साथ extra careful रहें।

Happy System Administration! 🖥️

WMIC Commands

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top
error: Content is protected !!