a. 啟動(dòng)Windows Management Instrumentation服務(wù),開放TCP135端口。
b. 本地安全策略的“網(wǎng)絡(luò)訪問: 本地帳戶的共享和安全模式”應(yīng)設(shè)為“經(jīng)典-本地用戶以自己的身份驗(yàn)證”。
USERACCOUNT【賬號管理】:
更改當(dāng)前用戶名
WMIC USERACCOUNT where "name='%UserName%'" call rename newUserName
WMIC USERACCOUNT create /?
SHARE【共享管理】:
建立共享
WMIC SHARE CALL Create "","test","3","TestShareName","","c:\test",0
(可使用 WMIC SHARE CALL Create /? 查看create后的參數(shù)類型)
刪除共享
WMIC SHARE where name="C$" call delete
WMIC SHARE where path='c:\\test' delete
SERVICE【服務(wù)管理】:
更改telnet服務(wù)啟動(dòng)類型[Auto|Disabled|Manual]
wmic SERVICE where name="tlntsvr" set startmode="Auto"
運(yùn)行telnet服務(wù)
wmic SERVICE where name="tlntsvr" call startservice
停止ICS服務(wù)
wmic SERVICE where name="ShardAccess" call stopservice
刪除test服務(wù)
wmic SERVICE where name="test" call delete
FSDIR【目錄管理】
列出c盤下名為test的目錄
wmic FSDIR where "drive='c:' and filename='test'" list
刪除c:\good文件夾
wmic fsdir "c:\\test" call delete
重命名c:\test文件夾為abc
wmic fsdir "c:\\test" rename "c:\abc"
wmic fsdir where (name='c:\\test') rename "c:\abc"
復(fù)制文件夾
wmic fsdir where name='d:\\test' call copy "c:\\test"
datafile【文件管理】
重命名
wmic datafile "c:\\test.txt" call rename c:\abc.txt
【任務(wù)計(jì)劃】:
wmic job call create "notepad.exe",0,0,true,false,********154800.000000+480
wmic job call create "explorer.exe",0,0,1,0,********154600.000000+480