fungsi WMIC pada DOS

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
001WMIC.exe
002 
003Windows Management Instrumentation Command.
004Read a huge range of information about local or remote computers. Also provides a way to make configuration changes to multiple remote machines.
005 
006Syntax
007Retrieve information about :
008WMIC [global_switches] [/locale:ms_409] [options] [format]
009 
010Interactive mode:
011WMIC
012 
013Aliases:
014ALIAS - Access local system aliases [CALL]
015 
016BASEBOARD - Base board management (motherboard or system board)
017BIOS - BIOS management (Basic input/output services)
018BOOTCONFIG - Boot configuration
019 
020CDROM - CD-ROM
021COMPUTERSYSTEM - Computer system [CALL/SET]
022CPU - CPU
023CSPRODUCT - Computer system product information from SMBIOS.
024 
025DATAFILE - DataFiles [CALL]
026DCOMAPP - DCOM Applications.
027DESKTOP - User's Desktop
028DESKTOPMONITOR - Desktop Monitor
029DEVICEMEMORYADDRESS - Device memory addresses
030DISKDRIVE - Physical disk drive
031DISKQUOTA - Disk space usage for NTFS volumes.[SET]
032DMACHANNEL - Direct memory access (DMA) channel
033 
034ENVIRONMENT - System environment settings [SET]
035FSDIR - Filesystem directory entry [CALL]
036 
037GROUP - Group account [CALL]
038 
039IDECONTROLLER - IDE Controller
040IRQ - Interrupt request line
041 
042JOB - Jobs scheduled using the schedule service.[CALL]
043 
044LOADORDER - System services that define execution dependencies.
045LOGICALDISK - Local storage devices [CALL/SET]
046LOGON - LOGON Sessions.
047 
048MEMCACHE - Cache memory
049MEMLOGICAL - System memory, layout and availability
050MEMPHYSICAL - Physical memory management
051 
052NETCLIENT - Network Client management.
053NETLOGIN - Network login information for a particular user.
054NETPROTOCOL - Protocols (and their network characteristics).
055NETUSE - Active network connection.
056NIC - Network Interface Controller (NIC)
057NICCONFIG - Network adapter. [CALL]
058NTDOMAIN - NT Domain. [SET]
059NTEVENT - NT Event Log.
060NTEVENTLOG - NT eventlog file [CALL/SET]
061 
062ONBOARDDEVICE - Common adapter devices built into the motherboard.
063OS - Operating System/s [CALL/SET]
064 
065PAGEFILE - Virtual memory file swapping
066PAGEFILESET - Page file settings [SET]
067PARTITION - Partitioned areas of a physical disk.
068PORT - I/O ports
069PORTCONNECTOR - Physical connection ports
070PRINTER - Printer device [CALL/SET]
071PRINTERCONFIG - Printer device configuration
072PRINTJOB - Print job [CALL]
073PROCESS - Processes [CALL]*
074PRODUCT - Windows Installer [CALL]
075 
076QFE - Quick Fix Engineering (patches)
077QUOTASETTING - Setting information for disk quotas on a volume. [SET]
078 
079REGISTRY - Computer system registry [SET]
080 
081SCSICONTROLLER - SCSI Controller [CALL]
082SERVER - Server information
083SERVICE - Service application [CALL]
084SHARE - Shared resourcees [CALL]
085SOFTWAREELEMENT - Elements of a software product*
086SOFTWAREFEATURE - Subsets of SoftwareElement. [CALL]*
087SOUNDDEV - Sound Devices
088STARTUP - Commands that run automatically when users logon
089SYSACCOUNT - System account
090SYSDRIVER - System driver for a base service. [CALL]
091SYSTEMENCLOSURE - Physical system enclosure
092SYSTEMSLOT - Physical connection points including ports,
093slots and peripherals, and proprietary connections points.
094 
095TAPEDRIVE - Tape drives
096TEMPERATURE - Temperature sensor (electronic thermometer).
097TIMEZONE - Time zone data
098 
099UPS - Uninterruptible power supply (UPS)
100USERACCOUNT - User accounts [CALL/SET]
101 
102VOLTAGE - Voltage sensor (electronic voltmeter) data
103VOLUME - Local storage volume [CALL/SET]
104VOLUMEQUOTASETTING - Associates the disk quota setting with a specific disk volume. [SET]
105 
106WMISET - WMI service operational parameters [SET]
107 
108New aliases in Windows 2003:
109MEMORYCHIP - Memory chip information.
110RDACCOUNT - Remote Desktop connection permission [CALL]
111RDNIC - Remote Desktop connection on a specific network adapter [CALL/SET]
112RDPERMISSIONS - Permissions to a specific Remote Desktop connection [CALL]
113RDTOGGLE - Turn Remote Desktop listener on or off remotely[CALL]
114RECOVEROS - Blue Screen Information [SET]
115SHADOWCOPY - Shadow copy management [CALL]
116SHADOWSTORAGE - Shadow copy storage areas [CALL/SET]
117VOLUMEUSERQUOTA - Per user storage volume quotas [SET]
118Options
119 
120By default an alias will return a standard LIST of information, you can also choose to GET one or more specific properties.
121 
122Configuration changes can be made, where indicated above with: [CALL or SET ]
123 
124The CREATE and DELETE options allow you to change the WMI schema itself.
125 
126alias
127alias LIST [BRIEF | FULL | INSTANCE | STATUS |SYSTEM | WRITEABLE]
128[/TRANSLATE:BasicXml|NoComma ]
129[/EVERY:no_secs] [/FORMAT:format]
130alias GET [property list]
131[/VALUE ] [/ALL ] [/TRANSLATE:BasicXml|NoComma ]
132[/EVERY:no_secs] [/FORMAT:format]
133alias CALL method_name [parameters]
134alias SET [assignments]
135alias CREATE
136alias DELETE
137alias ASSOC [/RESULTCLASS:classname] [/RESULTROLE:rolename][/ASSOCCLASS:assocclass]
138 
139For more help
140WMIC /locale:ms_409 /alias /?
141WMIC /locale:ms_409 /alias option /?
142e.g.
143WMIC /locale:ms_409 /BIOS /CALL /?
144WMIC /locale:ms_409 /MEMLOGICAL /SET /?
145The order of the /FORMAT and /TRANSLATE switches is significant: if /TRANSLATE follows /FORMAT, the output is formatted first and then translated.
146 
147All the options above can be extended with a WHERE clause, best shown by the examples below:
148 
149Format:
150Format 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
151 
152Stylesheets supplied with WMIC:
153 
154csv.xsl, hform.xsl, htable-sortby.xsl, htable.xsl
155texttable.xsl, textvaluelist.xsl, xml.xsl
156All output files are unicode text (convert to ASCII with TYPE) Tab Separated Values (.tsv) can be opened in excel
157 
158The 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).
159 
160Examples
161 
162WMIC /locale:ms_409 OS
163 
164WMIC OS LIST BRIEF
165 
166WMIC OS GET csname, locale, bootdevice
167 
168WMIC OS GET osarchitecture /value
169 
170WMIC /locale:ms_409 NTEVENT where LogFile='system'
171 
172WMIC NTEVENT where "LogFile='system' and Type>'0'"
173 
174WMIC SERVICE where (state=”running”) GET caption, name, state > services.tsv
175 
176WMIC SERVICE where caption='TELNET' CALL STARTSERVICE
177 
178WMIC PRINTER LIST STATUS
179 
180WMIC PRINTER where PortName="LPT1:" GET PortName, Name, ShareName
181 
182WMIC /INTERACTIVE:ON PRINTER where PortName="LPT1:" DELETE
183 
184WMIC PROCESS where name='evil.exe' delete
185 
186WMIC /output:"%computername%.txt" MEMORYCHIP where "memorytype=17" get Capacity
187 
188WMIC /node:@workstns.txt /failfast:on PROCESS call create "\\server\share\installer.cmd"
189 
190Interactive mode:
191C:>START "Windows Management" WMIC
192wmic:root\cli>/locale:ms_409
193wmic:root\cli>OS get csname
194wmic:root\cli>quit
195Notes
196 
197WMIC is available on XP Professional and Windows 2003 or later versions of Windows.
198 
199The availability of WMI information does vary across different versions of Windows
200e.g. ODBC, SNMP, Windows Installer.
201 
202To run WMIC requires administrator rights.
203 
204In Windows 2000, around 4,000 properties can be monitored, and around 40 can be configured.
205In Windows XP around 6,000 properties can be monitored, and around 140 can be configured.
206 
207Windows 2003 offers a few improvements and bug fixes: the global option /locale:ms_409 is not required (it defaults to English US.)
208 
209When 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

Postingan populer dari blog ini

Memperbaiki Flashdisk Tidak bisa di Copy

Cara mudah setting DHCP server di Mikrotik

Kumpulan Aplikasi nokia 9300 s80