Զ
  
ʹ˵
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
鿴ʷӹwifi 
 netsh wlan show profiles    2 netsh wlan show profiles "滻WIFI" key=clear
1 鿴ʷӹwifiûļ   2 ؼֵwifi
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡSID
wmic group get Caption, InstallDate, LocalAccount, Domain, SID, Status
ΪöٳSIDҪõWMICgroupѡ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process call create taskmgr.exe
WMICprocessѡ԰Ŀûϵͳдֹֽ̡ܿ԰ǴţռôĿϵͳڴ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
޸Ľȼ
wmic process where name=explorer.exe call set priority 64
WMICprocessѡ԰޸Ŀϵͳн̵ȼһǳõĹܡĳ̵ȼܻᵼضӦóĳ̵ȼᵼϵͳ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ֹ
wmic process where name=explorer.exe call terminate
WMIC԰ֹĿϵͳеĽ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡexeļб
wmic process where NOT ExecutablePath LIKE %Windows% GET ExecutablePath
öٳϵͳпִļ·ַ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡĿ¼
wmic fsdir where=drive=c: and filename=test get /format:list
WMICfsdirѡȡĿϵͳļĿ¼ĻϢаѹڡļСǷɶдǷΪϵͳļ״̬Լ͵ȵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡļ
wmic datafile where name=c:\windows\system32\demo\demo.txt get /format:list
WMICdatafileѡԻȡĿϵͳļĻϢаѹڡļСǷɶдǷΪϵͳļ״̬Լ͵ȵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
λϵͳļ
wmic environment get Description, VariableValue
WMICȡҪϵͳļ·tempĿ¼winĿ¼ȵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡװб
wmic product get name
ȡѰװӦóб
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
б
wmic service
ȡеķб֮WMICṩģʽ硰Զֶ͡С
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳ
wmic sysdriver get Caption, Name, PathName, ServiceType, State, Status /format:list
sysdriveѡöٳơ·ͷ͵
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳ
wmic os get CurrentTimeZone, FreePhysicalMemory, FreeVirtualMemory, LastBootUpdate,NumberofProcesses, NumberofUsers, Organization, RegisteredUsers, Status/format:list
osѡоٳĿϵͳһʱ䡢עû/ڴϢͰװĲϵͳ͵ȵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϢBIOS
wmic baseboard, get Manufacturer, Product, SerialNumber, Version
ϢBIOS
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ڴ滺
wmic memcache get Name, BlockSize, Purpose, MaxCacheSize, Status
memcacheѡԻȡڴ滺ͿСϢ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ڴоƬϢ
wmic memorychip get PartNumber, SerialNumber
memorychipѡԻȡRAMϢкŵȵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
û޸
wmic useraccount where name=hacker set passwordchangeable=false
Ʊû޸Ĳ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
û˺
wmic useraccount where name=demo set disabled=false
ʹuseraccountѡû˺
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
û˺
wmic useraccount where name=demo rename hacker
û˺
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Ʒ
wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState, pathToSignedProductExe
ǿöٳĿϵͳװķƷϢװλúͰ汾
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳ־
wmic nteventlog where filename=system cleareventlog
WMICnteventlogѡϵͳ־¼ĳϵͳ֮԰ڸǹۼ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡָϢ 
wmic process WHERE Name='Notepad.exe' list FULL
ȡ̵ָϸϢ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
̵С
wmic diskdrive GET Name,size /value
ȡ(߼)С
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ֵ
wmic environment get Name,variablevalue
ȡǰϵͳлֵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ͻϢ 
wmic netclient list full
ȡǰϵͳͻϢ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
û¼
wmic netlogin get name,lastlogon /value
ȡû¼ϵͳϢ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ʱԶе
wmic startup get command
ȡϵͳʱԶеϢ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ֹͣ
wmic service where "caption = 'Windows Update'" call stopService
ʹwmicֹͣ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic service where "caption = 'Windows Update'" call startService
ʹwmic
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ɾ
wmic SERVICE where name="test123" call delete
ʹwmicɾ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Զػ
Shutdown -s -t 600
600Զػ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Զ
Shutdown -r -t 600
600Զ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
̹ػ
shutdown -p
̹ػ-ʹshutdown -s -t 00ػҲػ˼
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
վ
start www.baidu.com
վ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳԱ˻
wmic group list full
ȡϵͳԱ˻ְ 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ǷΪ
wmic onboarddevice get Desciption, DeviceType, Enabled, Status /format:list
ǿԸonboarddeviceѡصϢжĿϵͳʵϵͳһ̨VMwareVirtual Box
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Զ̵
wmic /node:"192.168.203.131" /password:"" /user:"administrator"
Զ̵ĵԣҪһЩӦķ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
鿴bios汾ͺ
wmic bios get Manufacturer,Name

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
IPַ
wmic nicconfig where index=0 call enablestatic("192.168.1.5"), ("255.255.255.0") index=0˵ӿ1
ûIPַ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic nicconfig where index=0 call setgateways("192.168.1.1"),(1)
Ĭ·ɣ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
鿴ϵͳѡ,boot
wmic COMPUTERSYSTEM get SystemStartupOptions

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ļabcΪ123
wmic computersystem where "name = 'abc'" call rename 123

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ĹgoogleΪMyGroup
wmic computersystem where "name = 'google'" call joindomainorworkgroup "","","MyGroup",1

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
鿴cpuͺ
wmic cpu get name

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DataFile 


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile where "drive = 'e:' and path = '\test\' and FileName = 'cc' and Extension = 'cmd'" list
etestĿ¼(Ŀ¼)µcc.cmdļ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile where "drive = 'e:' and FileName = 'cc' and Extension = 'cmd' and FileSize > '1000'" list
eĿ¼Ŀ¼µcc.cmdļ,ļС1K
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile where "drive = 'e:' and Extension = 'cmd' and FileSize > '10000000'" call delete
ɾeļС10M.cmdļ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile where "drive = 'e:' and Extension < >'cmd' and path = 'test'" call delete
ɾetestĿ¼(Ŀ¼)µķ.cmdļ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile where "drive = 'e:' and path = '\test\' and FileName = 'cc' and Extension = 'cmd'" call copy "e:a.bat"
etestĿ¼(Ŀ¼)µcc.cmdļe:\,Ϊaa.bat
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile "d:\\hello.txt" call rename "d:\\test.txt"
c:\hello.txtΪc:\test.txt
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic datafile where "drive = 'h:' and extension = 'txt' and path like '%\test\%' and filename like '%perl%'" get name
hĿ¼test,ļperl,׺Ϊtxtļ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡĻֱ
wmic DESKTOPMONITOR where Status='ok' get ScreenHeight,ScreenWidth

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡͺŴС
wmic DISKDRIVE get Caption,size,InterfaceType

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳù


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic ENVIRONMENT where "name = 'temp'" get UserName,VariableValue
ȡtemp
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic ENVIRONMENT where "name = 'path' and username = '<system>'" set VariableValue=" % path%; e:	ools"
pathֵ,e:	ools
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic ENVIRONMENT create name="home",username=" < system > ",VariableValue=" % HOMEDRIVE % %HOMEPATH % "
ϵͳhome,ֵΪ%HOMEDRIVE%%HOMEPATH%
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic ENVIRONMENT where "name = 'home'" delete
ɾhome
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ļĿ¼ϵͳĿ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic FSDIR where "drive = 'e:' and filename = 'test'" list
eΪtestĿ¼
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic FSDIR where "drive = 'e:' and path = '\test\' and filename < >'abc'" call delete
ɾe:\testĿ¼³Ŀ¼abcĿ¼
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic fsdir "c:\good" call delete
ɾc:\goodļ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic fsdir "c:\good" rename \c:bb"
c:\goodļΪabb
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ش豸


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic LOGICALDISK get name,Description,filesystem,size,freespace
ȡӲϵͳʽܴСÿռ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ѰװĲϵͳ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic os where(primary=1) call setdatetime 20070731144642.555555+480
ϵͳʱ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ҳļù


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic PAGEFILESET set InitialSize="512",MaximumSize="512"
ĵǰҳļʼСֵ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic pagefileset create name='d:\pagefile.sys',initialsize=512,maximumsize=1024
ҳļõd:\,ִ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic pagefileset where"name = 'c:\pagefile.sys'" delete

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
̹


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process list brief
г̵ĺϢ,
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process where "name = 'svchost.exe' and ExecutablePath < >'C:\WINDOWS\system32\svchost.exe'" call Terminate
svchost.exe,·ΪC:\WINDOWS\system32\svchost.exe
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process call create notepad
½notepad
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
װ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic PRODUCT where "name = 'Microsoft .NET Framework 1.1' and Version = '1.1.4322'" call Uninstall
ж.msiװ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic PRODUCT where "name = 'Microsoft .NET Framework 1.1' and Version = '1.1.4322'" call Reinstall
޸.msiװ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic SERVICE where name="Spooler" call startservice
spooler
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic SERVICE where name="Spooler" call stopservice
ֹͣspooler
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic SERVICE where name="Spooler" call PauseService
ͣspooler
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic SERVICE where name="Spooler" set StartMode="auto]"
spooler[auto|Disabled|Manual] [Զ||ֶ]
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic SERVICE where name=]"test123" call delete
ɾ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Դ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic SHARE where name="e$" call delete
ɾ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

WMIC SHARE CALL Create "","test","3","TestShareName","","c:\test\,0
ӹ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
豸
wmic SOUNDDEV list

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
鿴msconfigеѡ
wmic STARTUP list

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ϵͳ
wmic SYSDRIVER list

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ûʻ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic USERACCOUNT where name="Administrator" set FullName="admin"
ûadministratorȫΪadmin
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic useraccount where "name = 'admin" call Rename admin00
ûadminΪadmin00
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡϢ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/node:legacyhost qfe get hotfixid
鿴ǰϵͳЩ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
鿴CPUǰٶ
wmic cpu get CurrentClockSpeed

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Զ̼Զ


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic /node:192.168.1.2 /USER:administrator
WMICԶ̼Զ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

PATH win32_terminalservicesetting WHERE (__Class!="") CALL SetAllowTSConnections 1

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


ʽ
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic /node:"full machine name" /USER:"domain username"

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

PATH win32_terminalservicesetting WHERE (__Class!="") CALL SetAllowTSConnections 1

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȡԼִ·
wmic process get name,executablepath

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ɾָ(ݽ)
wmic process where name="qq.exe" call terminate

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process where name="qq.exe" delete

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process where pid="123" delete
ɾָ(ݽPID)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic process call create "C:\Program Files\Tencent\QQ\QQ.exe"
½
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

wmic /node:192.168.201.131 /user:administrator /password:123456 process call create cmd.exe
Զ̻ϴ½
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
رձؼ
wmic process call create shutdown.exe

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Զ̼
wmic /node:192.168.1.10/user:administrator /password:123456 process call create "shutdown.exe - r - f - m"

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ļ
wmic computersystem where "caption = '%ComputerName%'" call rename newcomputername

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ʻ
wmic USERACCOUNT where "name = '%UserName%'" call rename newUserName

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ɽ̣ݽ̵·
wmic process where "name = 'explorer.exe' and executablepath < >'%SystemDrive%\windows\explorer.exe'" delete

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ȡڴ
wmic memlogical get TotalPhysicalMemory|find /i /v "t"

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ȫĳļȡļĿ¼
for /f "skip = 1 tokens = 1 * " %i in ('wmic datafile where "FileName = 'qq' and extension = 'exe'" get drive^,path') do (set "qPath = % i % j"&@echo %qPath:~0,-3%)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
