fungsi WMIC pada DOS
Berhubung cukup banyak yang melihat artikel ‘Melihat tipe motherboard tanpa membuka CPU‘ maka saya memutuskan untuk menambah informasi tentang WMIC pada post ini. Walaupun cuma copy paste saja, semoga cukup membantu teman-teman sekalian :)
Berikut adalah cupikan aslinya
003 | Windows Management Instrumentation Command. |
004 | Read a huge range of information about local or remote computers. Also provides a way to make configuration changes to multiple remote machines. |
007 | Retrieve information about : |
008 | WMIC [global_switches] [/locale:ms_409] [options] [format] |
014 | ALIAS - Access local system aliases [CALL] |
016 | BASEBOARD - Base board management (motherboard or system board) |
017 | BIOS - BIOS management (Basic input/output services) |
018 | BOOTCONFIG - Boot configuration |
021 | COMPUTERSYSTEM - Computer system [CALL/SET] |
023 | CSPRODUCT - Computer system product information from SMBIOS. |
025 | DATAFILE - DataFiles [CALL] |
026 | DCOMAPP - DCOM Applications. |
027 | DESKTOP - User's Desktop |
028 | DESKTOPMONITOR - Desktop Monitor |
029 | DEVICEMEMORYADDRESS - Device memory addresses |
030 | DISKDRIVE - Physical disk drive |
031 | DISKQUOTA - Disk space usage for NTFS volumes.[SET] |
032 | DMACHANNEL - Direct memory access (DMA) channel |
034 | ENVIRONMENT - System environment settings [SET] |
035 | FSDIR - Filesystem directory entry [CALL] |
037 | GROUP - Group account [CALL] |
039 | IDECONTROLLER - IDE Controller |
040 | IRQ - Interrupt request line |
042 | JOB - Jobs scheduled using the schedule service.[CALL] |
044 | LOADORDER - System services that define execution dependencies. |
045 | LOGICALDISK - Local storage devices [CALL/SET] |
046 | LOGON - LOGON Sessions. |
048 | MEMCACHE - Cache memory |
049 | MEMLOGICAL - System memory, layout and availability |
050 | MEMPHYSICAL - Physical memory management |
052 | NETCLIENT - Network Client management. |
053 | NETLOGIN - Network login information for a particular user. |
054 | NETPROTOCOL - Protocols ( and their network characteristics). |
055 | NETUSE - Active network connection. |
056 | NIC - Network Interface Controller (NIC) |
057 | NICCONFIG - Network adapter. [CALL] |
058 | NTDOMAIN - NT Domain. [SET] |
059 | NTEVENT - NT Event Log. |
060 | NTEVENTLOG - NT eventlog file [CALL/SET] |
062 | ONBOARDDEVICE - Common adapter devices built into the motherboard. |
063 | OS - Operating System/s [CALL/SET] |
065 | PAGEFILE - Virtual memory file swapping |
066 | PAGEFILESET - Page file settings [SET] |
067 | PARTITION - Partitioned areas of a physical disk. |
069 | PORTCONNECTOR - Physical connection ports |
070 | PRINTER - Printer device [CALL/SET] |
071 | PRINTERCONFIG - Printer device configuration |
072 | PRINTJOB - Print job [CALL] |
073 | PROCESS - Processes [CALL]* |
074 | PRODUCT - Windows Installer [CALL] |
076 | QFE - Quick Fix Engineering (patches) |
077 | QUOTASETTING - Setting information for disk quotas on a volume. [SET] |
079 | REGISTRY - Computer system registry [SET] |
081 | SCSICONTROLLER - SCSI Controller [CALL] |
082 | SERVER - Server information |
083 | SERVICE - Service application [CALL] |
084 | SHARE - Shared resourcees [CALL] |
085 | SOFTWAREELEMENT - Elements of a software product* |
086 | SOFTWAREFEATURE - Subsets of SoftwareElement. [CALL]* |
087 | SOUNDDEV - Sound Devices |
088 | STARTUP - Commands that run automatically when users logon |
089 | SYSACCOUNT - System account |
090 | SYSDRIVER - System driver for a base service. [CALL] |
091 | SYSTEMENCLOSURE - Physical system enclosure |
092 | SYSTEMSLOT - Physical connection points including ports, |
093 | slots and peripherals, and proprietary connections points. |
095 | TAPEDRIVE - Tape drives |
096 | TEMPERATURE - Temperature sensor (electronic thermometer). |
097 | TIMEZONE - Time zone data |
099 | UPS - Uninterruptible power supply (UPS) |
100 | USERACCOUNT - User accounts [CALL/SET] |
102 | VOLTAGE - Voltage sensor (electronic voltmeter) data |
103 | VOLUME - Local storage volume [CALL/SET] |
104 | VOLUMEQUOTASETTING - Associates the disk quota setting with a specific disk volume. [SET] |
106 | WMISET - WMI service operational parameters [SET] |
108 | New aliases in Windows 2003: |
109 | MEMORYCHIP - Memory chip information. |
110 | RDACCOUNT - Remote Desktop connection permission [CALL] |
111 | RDNIC - Remote Desktop connection on a specific network adapter [CALL/SET] |
112 | RDPERMISSIONS - Permissions to a specific Remote Desktop connection [CALL] |
113 | RDTOGGLE - Turn Remote Desktop listener on or off remotely[CALL] |
114 | RECOVEROS - Blue Screen Information [SET] |
115 | SHADOWCOPY - Shadow copy management [CALL] |
116 | SHADOWSTORAGE - Shadow copy storage areas [CALL/SET] |
117 | VOLUMEUSERQUOTA - Per user storage volume quotas [SET] |
120 | By default an alias will return a standard LIST of information, you can also choose to GET one or more specific properties. |
122 | Configuration changes can be made, where indicated above with: [CALL or SET ] |
124 | The CREATE and DELETE options allow you to change the WMI schema itself. |
127 | alias LIST [BRIEF | FULL | INSTANCE | STATUS |SYSTEM | WRITEABLE] |
128 | [/TRANSLATE:BasicXml|NoComma ] |
129 | [/EVERY:no_secs] [/FORMAT:format] |
130 | alias GET [property list] |
131 | [/VALUE ] [/ALL ] [/TRANSLATE:BasicXml|NoComma ] |
132 | [/EVERY:no_secs] [/FORMAT:format] |
133 | alias CALL method_name [parameters] |
134 | alias SET [assignments] |
137 | alias ASSOC [/RESULTCLASS:classname] [/RESULTROLE:rolename][/ASSOCCLASS:assocclass] |
140 | WMIC /locale:ms_409 /alias /? |
141 | WMIC /locale:ms_409 /alias option /? |
143 | WMIC /locale:ms_409 /BIOS /CALL /? |
144 | WMIC /locale:ms_409 /MEMLOGICAL /SET /? |
145 | The order of the /FORMAT and /TRANSLATE switches is significant: if /TRANSLATE follows /FORMAT, the output is formatted first and then translated. |
147 | All the options above can be extended with a WHERE clause, best shown by the examples below: |
150 | Format defines the layout of the information, XML output is automatically formatted using a default style sheet, while other formats (HTML, Table, MOF, Raw XML etc) can be specified using /FORMAT: stylesheet_name |
152 | Stylesheets supplied with WMIC: |
154 | csv.xsl, hform.xsl, htable-sortby.xsl, htable.xsl |
155 | texttable.xsl, textvaluelist.xsl, xml.xsl |
156 | All output files are unicode text (convert to ASCII with TYPE) Tab Separated Values (.tsv) can be opened in excel |
158 | The PROCESS alias can be used to start a new installation process, if doing this across the network, place the installer files on a share with permissions EVERYONE : Read Only. This is because network credentials will be dropped when jumping from one remote machine to another (unless you have kerberos configured). |
162 | WMIC /locale:ms_409 OS |
166 | WMIC OS GET csname, locale, bootdevice |
168 | WMIC OS GET osarchitecture /value |
170 | WMIC /locale:ms_409 NTEVENT where LogFile= 'system' |
172 | WMIC NTEVENT where "LogFile='system' and Type>'0'" |
174 | WMIC SERVICE where (state=”running”) GET caption, name, state > services.tsv |
176 | WMIC SERVICE where caption= 'TELNET' CALL STARTSERVICE |
178 | WMIC PRINTER LIST STATUS |
180 | WMIC PRINTER where PortName= "LPT1:" GET PortName, Name, ShareName |
182 | WMIC /INTERACTIVE:ON PRINTER where PortName= "LPT1:" DELETE |
184 | WMIC PROCESS where name= 'evil.exe' delete |
186 | WMIC /output: "%computername%.txt" MEMORYCHIP where "memorytype=17" get Capacity |
188 | WMIC /node:@workstns.txt /failfast:on PROCESS call create "\\server\share\installer.cmd" |
191 | C:>START "Windows Management" WMIC |
192 | wmic:root\cli>/locale:ms_409 |
193 | wmic:root\cli>OS get csname |
197 | WMIC is available on XP Professional and Windows 2003 or later versions of Windows. |
199 | The availability of WMI information does vary across different versions of Windows |
200 | e.g. ODBC, SNMP, Windows Installer. |
202 | To run WMIC requires administrator rights. |
204 | In Windows 2000, around 4,000 properties can be monitored, and around 40 can be configured. |
205 | In Windows XP around 6,000 properties can be monitored, and around 140 can be configured. |
207 | Windows 2003 offers a few improvements and bug fixes: the global option /locale:ms_409 is not required (it defaults to English US.) |
209 | When you type WMIC for the first time in Windows 2003 all the aliases are compiled. The second, and subsequent times you run WMIC, it will start immediately. Under XP WMIC is slower to initialise, therefore to run several WMI queries it can be quicker to use interactive mode. |
Sumber : http://ss64.com/nt/wmic.html <- list semua syntax DOS lengkap disini
Komentar