WMIC - Windows Management Instrumentation Command-line

WMIC is a command line interface to WMI -- Windows Management Instrumentation. It is an application interface which allows you low level access to a wide variety of information about systems, both hardware and software. Before WMIC, WMI-based applications (such as SMS), the WMI Scripting API, or tools such as CIM Studio were used to manage WMI-enabled computers.WMIC provided you a powerful, user-friendly interface to the WMI namespace. Earlier, you should had grasp on a programming language such as C++ or scripting.While WMIC is very powerful, it also is barely documented.

How to Run WMIC?

To invoke the WMIC command prompt, type

The following global switches are available:


/NAMESPACEPath for the namespace the alias operate against.
/ROLEPath for the role containing the alias definitions.
/NODEServers the alias will operate against.
/IMPLEVELClient impersonation level.
/AUTHLEVELClient authentication level.
/LOCALELanguage id the client should use.
/PRIVILEGESEnable or disable all privileges.
/TRACEOutputs debugging information to stderr.
/RECORDLogs all input commands and output.
/INTERACTIVESets or resets the interactive mode.
/FAILFASTSets or resets the FailFast mode.
/USERUser to be used during the session.
/PASSWORDPassword to be used for session login.
/OUTPUTSpecifies the mode for output redirection.
/APPENDSpecifies the mode for output redirection.
/AGGREGATESets or resets aggregate mode.
/AUTHORITYSpecifies the <authority type> for the connection.
For more information on a specific global switch, type: switch-name /?
The following alias/es are available in the current role:
ALIASAccess to the aliases available on the local system
BASEBOARDBase board (also known as a motherboard or system board) management.
BIOSBasic input/output services (BIOS) management.
BOOTCONFIGBoot configuration management.
CDROMCD-ROM management.
COMPUTERSYSTEMComputer system management.
CPUCPU management.
CSPRODUCTComputer system product information from SMBIOS.
DATAFILEDataFile Management.
DCOMAPPDCOM Application management.
DESKTOPUser's Desktop management.
DESKTOPMONITORDesktop Monitor management.
DEVICEMEMORYADDRESSDevice memory addresses management.
DISKDRIVEPhysical disk drive management.
DISKQUOTADisk space usage for NTFS volumes.
DMACHANNELDirect memory access (DMA) channel management.
ENVIRONMENTSystem environment settings management.
FSDIRFilesystem directory entry management.
GROUPGroup account management.
IDECONTROLLERIDE Controller management.
IRQInterrupt request line (IRQ) management.
JOBProvides  access to the jobs scheduled using the schedule service.
LOADORDERManagement of system services that define execution dependencies.
LOGICALDISKLocal storage device management.
MEMCACHECache memory management.
MEMORYCHIPMemory chip information.
MEMPHYSICALComputer system's physical memory management.
NETCLIENTNetwork Client management.
NETLOGINNetwork login information (of a particular user) management.
NETPROTOCOLProtocols (and their network characteristics) management
NETUSEActive network connection management.
NICNetwork Interface Controller (NIC) management.
NICCONFIGNetwork adapter management.
NTDOMAINNT Domain management.
NTEVENTEntries in the NT Event Log.
NTEVENTLOGNT eventlog file management.
ONBOARDDEVICEManagement of common adapter devices built into the motherboard (system board)
OSInstalled Operating System/s management.
PAGEFILEVirtual memory file swapping management.
PAGEFILESETPage file settings management.
PARTITIONManagement of partitioned areas of a physical disk.
PORTI/O port management.
PORTCONNECTORPhysical connection ports management.
PRINTERPrinter device management.
PRINTERCONFIGPrinter device configuration management.
PRINTJOBPrint job management.
PROCESSProcess management.
PRODUCTInstallation package task management.
QFEQuick Fix Engineering.
QUOTASETTINGSetting information for disk quotas on a volume.
RDACCOUNTRemote Desktop connection permission management.
RDNICRemote Desktop connection management on a specific network adapter.
RDPERMISSIONSPermissions to a specific Remote Desktop connection.
RDTOGGLETurning Remote Desktop listener on or off remotely.
RECOVEROSInformation that will be gathered from memory when the operating system fails.
REGISTRYComputer system registry management.
SCSICONTROLLERSCSI Controller management.
SERVERServer information management.
SERVICEService application management.
SHADOWCOPYShadow copy management.
SHADOWSTORAGEShadow copy storage area management.
SHAREShared resource management.
SOFTWAREELEMENTManagement of the  elements of a software product installed on a system.
SOFTWAREFEATUREManagement of software product subsets of SoftwareElement.
SOUNDDEVSound Device management.
STARTUPManagement of commands that run automatically when users log onto the computer
SYSACCOUNTSystem account management.
SYSDRIVERManagement of the system driver for a base service.
SYSTEMENCLOSUREPhysical system enclosure management.
SYSTEMSLOTManagement of physical connection points including ports,  slots and peripheras, and proprietary connections points.
TAPEDRIVETape drive management.
TEMPERATUREData management of a temperature sensor (electronic thermometer).
TIMEZONETime zone data management.
UPSUninterruptible power supply (UPS) management.
USERACCOUNTUser account management.
VOLTAGEVoltage sensor (electronic voltmeter) data management
VOLUMELocal storage volume management.
VOLUMEQUOTASETTINGAssociates the disk quota setting with a specific disk volume.
VOLUMEUSERQUOTAPer user storage volume quota management.
WMISETWMI service operational parameters management.

For more information on a specific alias, type: alias /?
CLASS     - Escapes to full WMI schema.
PATH      - Escapes to full WMI object paths.
CONTEXT   - Displays the state of all the global switches.
QUIT/EXIT - Exits the program.
For more information on CLASS/PATH/CONTEXT, type: (CLASS | PATH | CONTEXT) /?


To Get the Information of Patches installed on Computer.

WMIC qfe

To Get the Information of installed Softwares on Computer.

WMIC product get name

To Get the information of User logged to the system with Date

WMIC netlogin get name, lastlogon

WMIC /node:<computername> netlogin get name, lastlogon

No comments:

Post a Comment